Le vendredi 13 novembre 2009 à 15:15 +0100, Timo List a écrit :
> My program uses the SQLite database. The database holds some
> information about persons and I want to add a picture for each person.
> Not the path to the file, but the actual image so that the image also
> works if the file is deleted on the harddisk.
> 
> I can save the image in a BLOB column as:
> imgfile = open('/path/to/image.png')
> db.save_image(imgfile.read())
> 
> Works fine as far as I see. (Maybe any comments on this?)
> 
> Retrieving also works, but I see no possibility to show this image in
> a gtk.Image widget. I can't seem to find anything related to this on
> the net, maybe someone reading this has done this before?

Unless I missed something, this looks very similar to what a
PixbufLoader does, no ?

http://library.gnome.org/devel/pygtk/stable/class-gdkpixbufloader.html

Fred.


_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to