diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-20 22:06:14 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-20 22:06:14 +0200 |
commit | df16832c0c43015500b4f71aebabbb14e127b447 (patch) | |
tree | e6d6c22fe01ae07c0060c8795b7cea8bc7084da8 /readers.c | |
parent | 3377d6e3a37358bf47c23bd6a9213db354535141 (diff) | |
download | fbida-df16832c0c43015500b4f71aebabbb14e127b447.tar.gz |
fix flip & rotate
Diffstat (limited to 'readers.c')
-rw-r--r-- | readers.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -144,6 +144,19 @@ uint8_t *ida_image_scanline(struct ida_image *img, int y) return scanline; } +uint32_t ida_image_stride(struct ida_image *img) +{ + return pixman_image_get_stride(img->p); +} + +uint32_t ida_image_bpp(struct ida_image *img) +{ + uint32_t bits = PIXMAN_FORMAT_BPP(pixman_image_get_format(img->p)); + uint32_t bytes = bits / 8; + assert(bytes * 8 == bits); + return bytes; +} + void ida_image_free(struct ida_image *img) { assert(img->p != NULL); |