By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,746 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,746 IT Pros & Developers. It's quick & easy.

JPEG metadata

P: n/a
Does anyone aware of any program/apps/scripts that has the ability to
modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG,
etc.

Question for the experts, is it wise to store information in the image file
instead of the database? Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Useko Netsumi wrote:
Does anyone aware of any program/apps/scripts that has the ability to
modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG,
etc.

Yes. There is a specification to embed such information, it's called
EXIF (google it). Typically it's used by digital cameras but I don't
know much more about it then that. And YES again, PHP has a module you
can compile in which provides exif functionality.
Question for the experts, is it wise to store information in the image file
instead of the database? Thanks

It's a case of horses for courses. From a data modelling and design
point of view, if the metadata has a 1:1 relationsip with the image
instance entity, then sure, why not. From a performance point of view,
it is OK unless you want to search for images using the metadata (which
you probably do). From a maintanence point of view, it's great because
you don't even have to write database code or ensure access to a
database. Same applies for persisting information elsewhere like flat
files or XML.

Ideally, if the system is to have medium to high complexity, you will
want to use a hybrid approach. Keep everything in the database but
persist the metadata to the image files anyway so that when the get
copied around, the metadata goes with them. Windows XP uses it, and many
many other photo album programs use it.

I've had a pet project for an online PHP image gallery which uses XML
flat files to persist metadata. It reads the exif data from images when
they are uploaded and keeps it in the XML file associated with that
image. This is an example of a hybrid approach. I've not tried writing
exif data though.

It all depends on how complex your application will be.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.