>Software that came with our digital camera allows you add text (description
>of photo say) to the jpg file. This is NOT printed on this image, but is within
>the file so that the cataloguing tool can find it. This is useful and intriguing
>but what I really want to do is to add text, not by their software, but from
>inside our metadata database client. This means using the same entry as
>was made into some metadata fields (which of course is structured). Person
>only has to enter the information once and it remains attached to the jpg if
>someone looks at using the photo catalog tool.
>The trick is: WHERE in the jpg file format is this text actually being stored.
>Anyone know JPG internals well enough to comment?
The JPEG format is a tagged file format that contained a set of typed sections.
One of these sections is a descriptive text section. You could look at some
JPEG source code to see how to locate the correct tag and load its contents.
The idea is to copy everything before the descriptive tag.
Insert your own tag and data
copy everything after the tag.
I think the format supports multiple text blocks.
I would suggest looking on www.jpeg.org (or something like that) for pointers
to the jpeg format. I used it once to rapidly find the image dimensions of a jpeg
image.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz