Constructor

VipsImagethumbnail_buffer

Declaration [src]

int
vips_thumbnail_buffer (
  void* buf,
  size_t len,
  VipsImage** out,
  int width,
  ...
)

Description [src]

Exactly as vips_thumbnail(), but read from a memory buffer.

One extra optional argument, option_string, lets you pass options to the underlying loader.

::: tip “Optional arguments” * height: gint, target height in pixels * size: VipsSize, upsize, downsize, both or force * no_rotate: gboolean, don’t rotate upright using orientation tag * crop: VipsInteresting, shrink and crop to fill target * linear: gboolean, perform shrink in linear light * input_profile: gchararray, fallback input ICC profile * output_profile: gchararray, output ICC profile * intent: VipsIntent, rendering intent * fail_on: VipsFailOn, load error types to fail on * option_string: gchararray, extra loader options

::: seealso vips_thumbnail().

Parameters

buf An array of guint8
 

Memory area to load.

 The length of the array is specified in the len argument.
 The data is owned by the caller of the function.
len size_t
 

Size of memory area.

out VipsImage
 

Output image.

 The argument will be set by the function.
 The called function takes ownership of the data, and is responsible for freeing it.
width int
 

Target width in pixels.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.