Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: scripts/newbitmaps/bitmap_viewer

Issue 6598046: Add stuff to support new bitmap format. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: Agree to all changes. PTAL. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/newbitmaps/bitmap_viewer
diff --git a/scripts/newbitmaps/bitmap_viewer b/scripts/newbitmaps/bitmap_viewer
new file mode 100755
index 0000000000000000000000000000000000000000..795ff77ec215b1c3f1eb2db58577238a3e625d1b
--- /dev/null
+++ b/scripts/newbitmaps/bitmap_viewer
@@ -0,0 +1,34 @@
+#!/usr/bin/python -tt
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Quick-and-dirty viewer for bmpblock yaml files"""
+import os
+import sys
+import wx
+
+from lib import bmpblock
+from lib import pixcontrol
+from lib import pixdisplay
+
+class MyApp(wx.App):
+
+ def OnInit(self):
+ self._bmpblock = bmpblock.BmpBlock(sys.argv[1])
+ progname = os.path.basename(sys.argv[0])
+ self._mainframe = pixcontrol.Frame(self._bmpblock, progname)
+ self._mainframe.Show()
+ self.SetTopWindow(self._mainframe)
+ self._imgframe = pixdisplay.Frame(self._bmpblock, sys.argv[1])
+ self._imgframe.Show()
+ return True
+
+def main():
+ if len(sys.argv) != 2:
+ print "You must specify a config.yaml file to view"
+ sys.exit(1)
+ MyApp(False).MainLoop()
+
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698