Comment 25 for bug 1061037

Revision history for this message
In , Samuel-bauer (samuel-bauer) wrote :

when loading images with gdk_pixbuf_new_from_file_at_size, xpm files won't be handled correctly (they aren't resized).

This snippet of code:
#include <gdk/gdk.h>
#include <stdio.h>
#define SIZE 16

int main(int argc, char *argv[]) {
 GdkPixbuf *pixbuf;
 GError *err = NULL;
 char *file;

 if(argc > 1)
  file = argv[1];

 g_type_init();
 pixbuf = gdk_pixbuf_new_from_file_at_size ((gchar*)file, SIZE, SIZE, &err);
 if(err != NULL)
  printf("error\n");
 if(gdk_pixbuf_get_width(pixbuf) != SIZE || gdk_pixbuf_get_height(pixbuf) != SIZE)
  printf("%s %d %d\n", file, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf));
 return(0);
}
doesn't produce any output when reverting to gdk-pixbuf-2.24.0-r1, when it's noisy with last stable gdk-pixbuf (no error though image not resized).

I don't know if this wouldn't better be reported upstream.

Reproducible: Always

Expected Results:
xpm image should be resized when loaded so.