Method

GimpParasiteget_data

Declaration [src]

gconstpointer
gimp_parasite_get_data (
  const GimpParasite* parasite,
  guint32* num_bytes
)

Description [src]

Gets the parasite’s data. It may not necessarily be text, nor is it guaranteed to be NULL-terminated. It is your responsibility to know how to deal with this data. Even when you expect a nul-terminated string, it is advised not to assume the returned data to be, as parasites can be edited by third party scripts. You may end up reading out-of-bounds data. So you should only ignore num_bytes when you all you care about is checking if the parasite has contents.

Parameters

num_bytes

Type: guint32*

Size of the returned data.

The argument will be set by the function.
The argument can be set to NULL by the method.

Return value

Type: An array of char

Parasite’s data.

The length of the array is in the num_bytes argument.