r4033 - developers/werner
werner at sita.openmoko.org
werner at sita.openmoko.org
Sun Feb 10 07:54:26 CET 2008
Author: werner
Date: 2008-02-10 07:54:23 +0100 (Sun, 10 Feb 2008)
New Revision: 4033
Added:
developers/werner/scr2ppm.pl
Log:
scr2ppm.pl: converts from a screen dump to a PPM file
Added: developers/werner/scr2ppm.pl
===================================================================
--- developers/werner/scr2ppm.pl 2008-02-10 06:34:32 UTC (rev 4032)
+++ developers/werner/scr2ppm.pl 2008-02-10 06:54:23 UTC (rev 4033)
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+#
+# On GTA02, a screen dump can be obtained trough JTAG with
+# dump_image filename 0x8800000 0x96000
+#
+
+#
+# Usage:
+# scr2ppm.pl screendump >file.ppm
+#
+
+$d = join("", <>);
+
+print "P6\n480 640 255\n";
+
+for ($i = 0; $i < length $d; $i += 2) {
+ $v = unpack("v", substr($d, $i, 2));
+ print pack("ccc", ($v >> 11) << 3, ($v >> 5) << 2, $v << 3);
+}
Property changes on: developers/werner/scr2ppm.pl
___________________________________________________________________
Name: svn:executable
+ *
More information about the commitlog
mailing list