The most common type of fz_image is fz_compressed_image - that is, an image based upon a fz_buffer of data in a standard compressed format, such as JPEG, PNG, TIFF, and others.
With such images, the data is held in a fz_compressed_buffer:
The data is held in the buffer field, and the details of the compression used are given in the params field, of type fz_compression_params:
The choice of which of the union clauses is used is made by the type field:
To determine if a fz_image is a compressed image, call:
The easiest way to tell if an image is a compressed image is to request its underlying buffer. If it returns NULL, you know it is not this sort of image.