From df16832c0c43015500b4f71aebabbb14e127b447 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 20 Apr 2017 22:06:14 +0200 Subject: fix flip & rotate --- readers.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'readers.c') diff --git a/readers.c b/readers.c index b7da842..4fd09fc 100644 --- a/readers.c +++ b/readers.c @@ -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); -- cgit