save image and display image from postgresql

There is several way to save image into postgresql database. Using oid, blob and bytea data types.bytea column type recommended.

To store image
gdk_pixdata_from_pixbuf(),
gdk_pixdata_serialize()

To display image
gdk_pixdata_deserialize(),
gdk_pixbuf_from_pixdata(),
gtk_image_new_from_pixbuf()

Gdk Pixbuf inline
Libgnomedb Example

Thank to vivien and Yann Droneaud for great help

Advertisements

Published by

paragasu

Different. In a good way

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s