Le mercredi 23 juillet 2008 à 19:13 +0800, paragasu a écrit : > i am very new to gtk programming. I am sorry for this beginner > questions, but after asking > google i fail the get the right answer. I hope this mailing list will help me. > > anyone can please point me a way on how to save image to postgresql > database and > display the image again. >
You could use gdk_pixdata_from_pixbuf(), gdk_pixdata_serialize() to store the image on the database server as a BLOB or converted to a string encoded in Base64. And use gdk_pixdata_deserialize(), gdk_pixbuf_from_pixdata() to convert the data back to a GdkPixbuf for display. See http://library.gnome.org/devel/gdk-pixbuf/stable/gdk-pixbuf-inline.html But, IMHO, storing image in a database is not the best way: storing in database the path to an image stored on a filesystem could be a better idea (on a single computer, the application will benefit from the filesystem cache). Regards -- Yann Droneaud <[EMAIL PROTECTED]> _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list