fbsplash: allow compressed image files

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Vladimir Dronnikov 2009-11-07 04:14:50 +01:00 committed by Denys Vlasenko
parent 9be4f31da0
commit 6eaac025a1

View File

@ -221,7 +221,14 @@ static void fb_drawimage(void)
unsigned char *pixline; unsigned char *pixline;
unsigned i, j, width, height, line_size; unsigned i, j, width, height, line_size;
theme_file = xfopen_stdin(G.image_filename); if (LONE_DASH(G.image_filename))
theme_file = stdin;
else {
int fd = open_zipped(G.image_filename);
if (fd < 0)
bb_simple_perror_msg_and_die(G.image_filename);
theme_file = fdopen(fd, "r");
}
head = xmalloc(256); head = xmalloc(256);
/* parse ppm header /* parse ppm header