Image.GetData() and storing in DB

Hi all,

for quite some time I’m looking for some error
I thought I made while storing an image (PNG) in a MySQL-database (requirement).
My test image is a png of less than 2k, if I load it with

wx.Image(TMPPNG, wx.BITMAP_TYPE_PNG).GetData()

and save it in the DB (after escaping), it’s 60k.
Since I couldn’t get any useful stuff out of the DB I checked this:

f=open ("/windows/temp/TEST_1.png",
“w”) # TEST

f.write (wx.Image(TMPPNG,
wx.BITMAP_TYPE_PNG).GetData()) # TEST

f.close() # TEST

And yes, this is something as big as 60k and with
invalid header.

According to the API docs (as much as I could get
there) Image.GetData() returns a PyObject which is most probably not what I
want. What do I have to do to save my Image as a valid .png-file in the filesystem
and / or DB?

Thanks for any help! - Bernd