diff options
author | Bill Richardson <wfrichar@chromium.org> | 2011-03-01 12:58:27 -0800 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2011-03-01 12:58:27 -0800 |
commit | dfe4ca5e4057132b634c3df859ddecbdee35cd29 (patch) | |
tree | c58e3bf264b6e19cd380a454926cb9cd3aabae36 /scripts/newbitmaps/bitmap_viewer | |
parent | 618d17d48ceb095e06f7c4395217c304567f316e (diff) | |
download | vboot-dfe4ca5e4057132b634c3df859ddecbdee35cd29.tar.gz |
Add stuff to support new bitmap format.
Add bitmap_viewer program (to run OUTSIDE of chroot) and example bitmaps (to
be replaced by the REAL bitmaps for each platform).
BUG=chromium-os:10949
TEST=none
These are just nonessential tools and examples. No regression testing needed.
Change-Id: I7f9aab30809251e4c62d71bfa73293d0b4d97196
Review URL: http://codereview.chromium.org/6598046
Diffstat (limited to 'scripts/newbitmaps/bitmap_viewer')
-rwxr-xr-x | scripts/newbitmaps/bitmap_viewer | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/newbitmaps/bitmap_viewer b/scripts/newbitmaps/bitmap_viewer new file mode 100755 index 00000000..795ff77e --- /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() |