]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-02/images.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-02 / images.py
1 #----------------------------------------------------------------------
2 # This file was generated by encode_bitmaps.py
3 #
4 from wx import ImageFromStream, BitmapFromImage
5 from wx import EmptyIcon
6 import cStringIO
7
8 def getNewData():
9 return \
10 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0f\x08\x06\
11 \x00\x00\x00\xedsO/\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
12 \x00YIDATx\x9c\xed\xd31\n@!\x0c\x03\xd0\xa4\xfe\xfb\xdfX\xe3\xf0\x97R\xa5(.\
13 \x0ef\x13\xe45\xa2\x92Vp\x92\xcf/\xd4\xaa\xb2\xcd\xb4\xc2\x14\x00\x00in\x90\
14 \x84ZUDl\xa9\xa7\xc3c\xcb-\x80\xfc\x87{d8B6=B\xdb\rfy\xc0\r\xc0\xf0\x0e\xfc\
15 \x1d\xaf\x84\xa7\xbf\xb1\x03\xe1,\x19&\x93\x9a\xd2\x97\x00\x00\x00\x00IEND\
16 \xaeB`\x82'
17
18 def getNewBitmap():
19 return BitmapFromImage(getNewImage())
20
21 def getNewImage():
22 stream = cStringIO.StringIO(getNewData())
23 return ImageFromStream(stream)
24