Bug in gdk_image_new



Hola.

While trying to find out why gimp didn't start (seg'd) on this 4bpp
grayscale display I found that only 8, 16, 24 and 32 bits per pixel
(private->ximage->bits_per_pixel) was handled in gdk_image_new() (line
~320 in gdkimage.c).
All other bpp's was ignored and image->bpp was uninitialized. Setting it
to 0 on this 4 bpp visual works (since it's actually 0.5 bytes per
pixel, but it's handled later atleast in gimp with the bytes per line
thingie).

With a quick hack to add 'image->bpp = 0;' at the default case, gimp
starts and seems to enjoy life..

PS. I don't like it that bpp can be bits per pixel and bytes per pixel
depending on mood DS.

/Tomas
-- 
Tomas Ögren, stric@ing.umu.se, http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]