r1051 - developers/werner/splash
werner at sita.openmoko.org
werner at sita.openmoko.org
Tue Feb 20 09:11:02 CET 2007
Author: werner
Date: 2007-02-20 09:10:31 +0100 (Tue, 20 Feb 2007)
New Revision: 1051
Added:
developers/werner/splash/imghs.pl
Log:
Raw framebuffer image converter, with HWSWP enabled
Added: developers/werner/splash/imghs.pl
===================================================================
--- developers/werner/splash/imghs.pl 2007-02-20 05:08:48 UTC (rev 1050)
+++ developers/werner/splash/imghs.pl 2007-02-20 08:10:31 UTC (rev 1051)
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+system("pngtopnm System_boot.png | ppmtorgb3");
+for ("red", "grn", "blu") {
+ open(FILE,"noname.$_") || die "noname.$_";
+ $f = join("",<FILE>);
+ close FILE;
+ unlink("noname.$_");
+ $f =~ s/^P5\s+(\d+)\s+(\d+)\s+(\d+)\s//s;
+ ($w,$h,$p) = ($1,$2,$3);
+ $p{$_} = $f;
+}
+print STDERR "$w x $h ($p)\n";
+for ($i = 0; $i != $w*$h; $i++) {
+ $r = unpack("C",substr($p{"red"},$i,1));
+ $g = unpack("C",substr($p{"grn"},$i,1));
+ $b = unpack("C",substr($p{"blu"},$i,1));
+ $v = ($r >> 3) << 11 | ($g >> 2) << 5 | ($b >> 3);
+ print pack("v",$v);
+}
Property changes on: developers/werner/splash/imghs.pl
___________________________________________________________________
Name: svn:executable
+ *
More information about the commitlog
mailing list