About the fbsplash applet, the log message of the revision 25366 says:
bail out if screen resolution does not match PPM dimensions.
Previously a 640x480 PPM on an e.g. 720x400 console would just segfault when
reading the lines. While this bug should perhaps be fixed to handle such cases
properly we just exit gracefully until somebody is willing to take care of it
properly.
fbsplash supports only display with 16bpp colour depth. Unfortunately I
can't change the framebuffer of my laptop display to another resolution
maintaining the same colors number.
I tried to display on my 640x480, 16bpp framebuffer, two images; the
first one smaller and the second one larger than my screen resolution.
In both cases the images are displayed correctly, without any
segmentation fault.
Are you sure that the problem is the image resolution and not its colors
number? Both my images are in RGB colors (24 bpp), as required by the
fbsplash; their are converted to 16bpp (565 coded) within the
fb_drawimage function:
for (i = 0; i < width; i++) {
unsigned thispix;
thispix = (((unsigned)pixel[0] << 8) & 0xf800)
| (((unsigned)pixel[1] << 3) & 0x07e0)
| (((unsigned)pixel[2] >> 3));
*src++ = thispix;
pixel += 3;
}
Can you send me the image are you using?
Anyway, the attached patch sets the 'linesize' value after that the
'width' variable was modified. Please, can you try it?
Thanks.
--
Michele Sanges
--- busybox-20090223/miscutils/fbsplash.c 2009-02-23 01:20:12.000000000
+0100
+++ busybox-20090223_modified/miscutils/fbsplash.c 2009-02-23
17:20:33.000000000 +0100
@@ -257,15 +257,17 @@
if (ENABLE_FEATURE_CLEAN_UP)
free(head);
- if (width != G.scr_var.xres || height != G.scr_var.yres)
+/* if (width != G.scr_var.xres || height != G.scr_var.yres)
bb_error_msg_and_die("PPM %dx%d does not match screen %dx%d",
width, height,
G.scr_var.xres, G.scr_var.yres);
- line_size = width*3;
+*/
if (width > G.scr_var.xres)
width = G.scr_var.xres;
if (height > G.scr_var.yres)
height = G.scr_var.yres;
+ line_size = width*3;
+
pixline = xmalloc(line_size);
for (j = 0; j < height; j++) {
unsigned char *pixel = pixline;
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox