seems different from code which created by img2py.
What does that mean -- "seems different"? It's exactly the same. That
string is not magic. It's just the contents of the GIF file, read into
a string and printed. It's the exact same thing you'd get if you opened
the interpreter and said:
>>> open('xxx.gif','rb').read()
It just so happens that the printed representation of a string is a
relatively good way to embed the string in source code.
···
On Mon, 17 Nov 2008 22:01:17 -0600 > Cody Precord <codyprecord@gmail.com> wrote:
On Nov 17, 2008, at 9:53 PM, Roy Liu wrote:
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
What does that mean -- "seems different"? It's exactly the same. That
string is not magic. It's just the contents of the GIF file, read into
a string and printed. It's the exact same thing you'd get if you opened
the interpreter and said:
>>> open('xxx.gif','rb').read()
no, it's not -- it's the image read into a wxImage, then dumped in some binary format -- I don't remember which, but it's not GIF.
anyway, the point is the same -- it's a binary representation of the image that wx can deal with.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
seems different from code which created by img2py.
What does that mean -- "seems different"? It's exactly the same.
The img2py utility was recently updated to produce the image data in a slightly more compact and easier to deal with format. The data shown above is from the previous version of img2py, although it still works fine.
That
string is not magic. It's just the contents of the GIF file, read into
a string and printed. It's the exact same thing you'd get if you opened
the interpreter and said:
>>> open('xxx.gif','rb').read()
As can be seen embedded in the image data header above, its actually a PNG image.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
<div class="moz-text-flowed" style="font-family: -moz-fixed">Tim
Roberts wrote:
What does that mean -- "seems different"? It's exactly the same. That
string is not magic. It's just the contents of the GIF file, read into
a string and printed. It's the exact same thing you'd get if you opened
the interpreter and said:
>>> open('xxx.gif','rb').read()
no, it's not -- it's the image read into a wxImage, then dumped in
some binary format -- I don't remember which, but it's not GIF.
You're right, his example was not a GIF. It was a PNG. Quoting:
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR...
However, there is no additional wrapper here. That's just a raw PNG,
dumped exactly as I quoted above.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.