typedef struct GP_Context { uint8_t *pixels; /* pointer to image pixels */ uint8_t bpp; /* pixel length in bits */ uint32_t bytes_per_row; uint32_t w; /* width in pixels */ uint32_t h; /* height in pixels */ /* * Row bit offset. The offset is ignored for byte aligned pixels. * Basically it's used for non aligned pixels with combination * with subcontextes. */ uint8_t offset; enum GP_PixelType pixel_type; /* pixel format */ /* * Pointer to optional Gamma correction tables. */ struct GP_Gamma *gamma; uint8_t axes_swap:1; /* swap axes */ uint8_t x_swap:1; /* mirror x */ uint8_t y_swap:1; /* mirror y */ uint8_t bit_endian:1; /* GP_BIT_ENDIAN */ uint8_t free_pixels:1; /* if set GP_ContextFree() calls free on context->pixels */ } GP_Context;