From: | "Brent Wood" <b(dot)wood(at)niwa(dot)co(dot)nz> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org>, <avin_friends(at)yahoo(dot)com> |
Subject: | Re: To store and retrive image data in postgresql |
Date: | 2008-07-08 01:12:17 |
Message-ID: | 487367B20200007B00013EE5@gwia1.ham.niwa.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>> aravind chandu <avin_friends(at)yahoo(dot)com> 07/08/08 10:30 AM >>>
Hello,
I need to store
an image in postgresql database and after that i need to retrive the
image back.Can you please help me how to do this?
Hi,
I have been involved in building a few applications to manage this capability. In the 3 cases to date, we store the info about the image in the database, including the name/path/URL to the image, and have an application retrieve the image for us from this data. We have not (yet) found any added value in storing the image itself as a binary object in the database. Images are stored as files on the system.
One (relatively) easy way to demonstrate this is using QGIS. This is able to display data stored in PostGIS tables (PostGIS adds spatial support to Postgres, so we can store a point location with an image name/path). We can plot a map in QGIS showing the points representing photographs, and via the "action" capability in QGIS, we can create a command to click an image on the map & display it, retrieving the path & name from the database in order to do so.
One PostGIS/ImageJ application we are working on does store ImageJ ROI files as binary objects in the database, but the images they are derived from is still stored outside the database as a file, with the path/name stored as database fields as a pointer to the image.
HTH,
Brent Wood
From | Date | Subject | |
---|---|---|---|
Next Message | spellberg_robert | 2008-07-08 01:14:30 | Re: [pg_gen] what was the "issue" with the 8.3.2 bundle ? |
Previous Message | Tom Lane | 2008-07-08 00:09:10 | Re: [pg_gen] what was the "issue" with the 8.3.2 bundle ? |