Skip to contentSkip to conversation

Add gzipped logo support

PATCH New Mark Jackson 2 participants 2 messages Jul 31, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add gzipped logo support

The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows:-

If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the splashscreen support or the bmp command.

However, the splashscreen function *only* supports standard BMP images.

This patch adds the documented gzip support.

---

 common/lcd.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
common/lcd.c +13 -0
index eec1f53..3bbc7ba 100644
@@ -740,6 +740,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 }
 #endif
 
+#ifdef CONFIG_VIDEO_BMP_GZIP
+extern bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp);
+#endif
 
 static void *lcd_logo (void)
 {
@@ -761,6 +764,16 @@ static void *lcd_logo (void)
 		addr = simple_strtoul(s, NULL, 16);
 		do_splash = 0;
 
+#ifdef CONFIG_VIDEO_BMP_GZIP
+		bmp_image_t *bmp = (bmp_image_t *)addr;
+		unsigned long len;
+
+		if (!((bmp->header.signature[0]=='B') &&
+		      (bmp->header.signature[1]=='M'))) {
+			addr = (ulong)gunzip_bmp(addr, &len);
+		}
+#endif
+
 		if (lcd_display_bitmap (addr, 0, 0) == 0) {
 			return ((void *)lcd_base);
 		}
#1 lore raw

PATCH 1/1 Add gzipped logo support

Quoted 8 lines · In message <[email protected]> you wrote:

The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows:-

If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the splashscreen support or the bmp command.

However, the splashscreen function *only* supports standard BMP images.

Quoted 7 lines

This patch adds the documented gzip support.

---

 common/lcd.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If God wanted me to touch my toes, he'd have put them on my knees.