Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13180
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: EXIF tag handling in Java |
| Date | 2012-03-25 23:37 +0000 |
| Organization | UK Free Software Network |
| Message-ID | <jkoa7u$4v4$1@localhost.localdomain> (permalink) |
| References | <jkleq5$dhh$1@localhost.localdomain> <nospam-D45A44.14453125032012@news.aioe.org> |
Thanks to all of you who have responded. I should have enough information now to be able to dig into the issue of adding comments to images in the form of EXIF tags. Perhaps I should explain what I'm doing. I have a Java program, run overnight as a cron job, that can walk a directory tree and decorate it with a thumbnail of every new or modified image it finds. As I run an in- house webserver, this is enough to let a PHP script generate on-the-fly menus from directories in the tree which contain clickable links to all files in the directory. Links to images display the thumbnail as part of that menu entry. However, this doesn't work if you simply point a browser at a local copy of the directory structure, so the Java program can also generate a linked set of static menus that work in the same way for people who don't run a web server. This is working reliably and well. It has met my design target of automatically indexing sets of images as they are dropped on a hard drive so they can be scrolled through using smaller images that those can be selected so the full resolution image can be seen. Now I'd like to display descriptions, when they are available, under the thumbnails. Thanks to all of you I now know that I can write a program to add the descriptions to the images as EXIF 'Comment' tags and in parallel I've checked that PHP can extract the content of those tags in order to add them to the on-the-fly menus and that Java can do the same for the static menus. The only issue is speed: the PHP library routines to check that the image is the right type to have EXIF tags and to extract the tags require each image to be read several times: (1) to display the thumbnail, (2) to see if it is the right type to hold tags [this can probably be skipped] and (3) to extract the Comment tag's content. Currently only (1) happens, so I need to benchmark things to see if the PHP script is fast enough to support extracting captions from EXIF tags: this is not a consideration for the Java menu builder since this is never run when a user wants to see an list of images *right now*. If the PHP menu generator is unacceptably slow when dealing with EXIF tags, I'll use the aesthetically ugly trick of keeping the captions as a separate CSV list (filename,caption) which will probably be faster since at the start of the run it can be loaded into a Hashtable (Java) or associative array (PHP) once and will stay in memory while the menu builder is running. Thanks again for your help. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-24 21:37 +0000
Re: EXIF tag handling in Java Marty Blake <blake3334@nowhere.invalid> - 2012-03-24 23:13 -0400
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 13:09 +0000
Re: EXIF tag handling in Java Jeff Higgins <jeff@invalid.invalid> - 2012-03-25 11:42 -0400
Re: EXIF tag handling in Java Jeff Higgins <jeff@invalid.invalid> - 2012-03-25 12:22 -0400
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 17:10 +0000
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 16:46 +0000
Re: EXIF tag handling in Java Jeff Higgins <jeff@invalid.invalid> - 2012-03-25 12:59 -0400
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 17:15 +0000
Re: EXIF tag handling in Java Jeff Higgins <jeff@invalid.invalid> - 2012-03-25 14:08 -0400
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 18:34 +0000
Re: EXIF tag handling in Java Knute Johnson <nospam@knutejohnson.com> - 2012-03-25 10:46 -0700
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 18:13 +0000
Re: EXIF tag handling in Java "John B. Matthews" <nospam@nospam.invalid> - 2012-03-25 14:45 -0400
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-25 23:37 +0000
Re: EXIF tag handling in Java Lew <lewbloch@gmail.com> - 2012-03-26 11:56 -0700
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-26 19:48 +0000
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-26 19:52 +0000
Re: EXIF tag handling in Java Lew <lewbloch@gmail.com> - 2012-03-26 13:29 -0700
Re: EXIF tag handling in Java Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-26 21:58 +0000
Re: EXIF tag handling in Java Lew <lewbloch@gmail.com> - 2012-03-26 16:24 -0700
Re: EXIF tag handling in Java Gene Wirchenko <genew@ocis.net> - 2012-03-26 18:19 -0700
Re: EXIF tag handling in Java Lew <lewbloch@gmail.com> - 2012-03-26 19:03 -0700
Re: EXIF tag handling in Java Gene Wirchenko <genew@ocis.net> - 2012-03-27 09:06 -0700
csiph-web