Constructor

VipsImagenew_from_memory_copy

Declaration [src]

VipsImage*
vips_image_new_from_memory_copy (
  void* data,
  size_t size,
  int width,
  int height,
  int bands,
  VipsBandFormat format
)

Description [src]

Like vips_image_new_from_memory(), but VIPS will make a copy of the memory area. This means more memory use and an extra copy operation, but is much simpler and safer.

Parameters

data

Type: An array of guint8

Start of memory area.

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

Type: size_t

Length of memory area.

width

Type: int

Image width.

height

Type: int

Image height.

bands

Type: int

Image bands (or bytes per pixel).

format

Type: VipsBandFormat

Image format.

Return value

Type: VipsImage

The new VipsImage, or NULL on error.

The caller of the function takes ownership of the data, and is responsible for freeing it.