struct png_text_struct

Defined at line 560 of file ../../third_party/libpng/src/png.h

png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,

and whether that contents is compressed or not. The "key" field

points to a regular zero-terminated C string. The "text" fields can be a

regular C string, an empty string, or a NULL pointer.

However, the structure returned by png_get_text() will always contain

the "text" field as a regular zero-terminated C string (possibly

empty), never a NULL pointer, so it can be safely used in printf() and

other string-handling functions. Note that the "itxt_length", "lang", and

"lang_key" members of the structure only exist when the library is built

with iTXt chunk support. Prior to libpng-1.4.0 the library was built by

default without iTXt support. Also note that when iTXt *is* supported,

the "lang" and "lang_key" fields contain NULL pointers when the

"compression" field contains * PNG_TEXT_COMPRESSION_NONE or

PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the

same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag"

which is always 0 or 1, or its "compression method" which is always 0.

Public Members

int compression
png_charp key
png_charp text
size_t text_length
size_t itxt_length
png_charp lang
png_charp lang_key