]> git.draconx.ca Git - liblbx.git/blobdiff - src/gui/render.c
liblbx: Remove now-redundant fields from lbx_imginfo.
[liblbx.git] / src / gui / render.c
index 370c816dff8d0037a8eb31c5d13ae8728aa8d6ba..c2101b53a415df4b4554144787caabef61e91b24 100644 (file)
@@ -49,12 +49,10 @@ static void get_colour(unsigned char index, unsigned char out[static 4])
 int render_to_pixbuf(struct lbx_image *image, GdkPixbuf *pixbuf, unsigned frame)
 {
        unsigned char **framedata, **framemask, *outbuf;
-       struct lbx_imginfo info;
        unsigned stride;
 
-       lbx_img_getinfo(image, &info);
-       assert(info.width  == gdk_pixbuf_get_width(pixbuf));
-       assert(info.height == gdk_pixbuf_get_height(pixbuf));
+       assert(image->width  == gdk_pixbuf_get_width(pixbuf));
+       assert(image->height == gdk_pixbuf_get_height(pixbuf));
 
        framedata = lbx_img_getframe(image, frame);
        g_return_val_if_fail(framedata, -1);
@@ -63,10 +61,10 @@ int render_to_pixbuf(struct lbx_image *image, GdkPixbuf *pixbuf, unsigned frame)
        outbuf = gdk_pixbuf_get_pixels(pixbuf);
        stride = gdk_pixbuf_get_rowstride(pixbuf);
 
-       for (unsigned i = 0; i < info.height; i++) {
+       for (unsigned i = 0; i < image->height; i++) {
                unsigned char (*px)[4] = (void *)(outbuf + i*stride);
 
-               for (unsigned j = 0; j < info.width; j++) {
+               for (unsigned j = 0; j < image->width; j++) {
                        if (framemask[i][j])
                                get_colour(framedata[i][j], px[j]);
                        else