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.