Constructor

PurpleImagenew_from_data

unstable since: 3.0

Declaration [src]

PurpleImage*
purple_image_new_from_data (
  const guint8* data,
  gsize length
)

Description [src]

Creates a new PurpleImage object with contents of data buffer.

The data buffer is owned by PurpleImage object, so you might want to g_memdup2() it first.

Available since: 3.0

Parameters

data

Type: const guint8*

The pointer to the image data buffer.

The data is owned by the caller of the function.
length

Type: gsize

The length of data.

Return value

Type: PurpleImage

The new PurpleImage.

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