Virtual Method

VipsSourceread

Declaration [src]

gint64
read (
  VipsSource* source,
  void* buffer,
  size_t length
)

Description [src]

Read up to length bytes from source and store the bytes in buffer. Return the number of bytes actually read. If all bytes have been read from the file, return 0.

Arguments exactly as read().

Parameters

buffer void*
 

Store bytes here.

 The argument can be NULL.
 The data is owned by the caller of the function.
length size_t
 

Length of buffer in bytes.

Return value

Returns: gint64
 

The number of bytes read, 0 on end of file, -1 on error.