aboutsummaryrefslogtreecommitdiffstats
path: root/readers.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-04-20 22:06:14 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-04-20 22:06:14 +0200
commitdf16832c0c43015500b4f71aebabbb14e127b447 (patch)
treee6d6c22fe01ae07c0060c8795b7cea8bc7084da8 /readers.c
parent3377d6e3a37358bf47c23bd6a9213db354535141 (diff)
downloadfbida-df16832c0c43015500b4f71aebabbb14e127b447.tar.gz
fix flip & rotate
Diffstat (limited to 'readers.c')
-rw-r--r--readers.c13
1 files changed, 13 insertions, 0 deletions
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);