Struct
GimpParasite
Description [src]
struct GimpParasite {
gchar* name;
guint32 flags;
guint32 size;
gpointer data[];
}
Arbitrary pieces of data which can be attached to various GIMP objects.
Structure members
name:
gchar*
The parasite name, USE A UNIQUE PREFIX.
flags:
guint32
The parasite flags, like save in XCF etc.
size:
guint32
The parasite size in bytes.
data:
gpointer
The parasite data, the owner os the parasite is responsible for tracking byte order and internal structure.
Constructors
gimp_parasite_new
Creates a new parasite and save data
which may be a proper text (in
which case you may want to set size
as strlen(data
) + 1) or not.
Instance methods
gimp_parasite_get_data
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.