Skip to main content

Reading File-Info Comments from a JPG File

4 replies [Last post]
Brokit
Offline
Joined: 2006-02-17
Points: 0

Hi.

I´d like to read Information from JPG´s with additional information added to the file in Windows by File > rightclick > Properties > File Info (or whatever it´s called in English). Comments like Title, Author, Remarks etc..

I already tried the class 'ImageInfo' (http://www.geocities.com/marcoschmidt.geo/image-info.html) with its´ 'getComments' Method but it obviously doesn´t work with my files. Is there any solution to accomplish that?

Thanks in advance, Elmar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Brokit
Offline
Joined: 2006-02-17
Points: 0

Thank you. I finally figured out how to extract the comments. Unfortunatly the Windows file comments are stored in a different format and I am not able to extract these.

Thanks anyway for your support!
Elmar

bpb
Offline
Joined: 2004-06-23
Points: 0

You should be able to pull all comment data inserted into locations represented by the JPEG image metadata DTD. For more information on the metadata structure please refer to:

http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/metadata/doc-files...

Brian

Brokit
Offline
Joined: 2006-02-17
Points: 0

Nope. It just doesn´t seem to work. I am not able to see any file comments, exif header. I can read some of the ImageMetadata but that only generates stuff like

JPEGvariety
app0JFIF
markerSequence
unknown
unknown
com
dqt
dqtable
dqt
dqtable...

What I need is a working example of how to proberly pull additional file information and comments from a JPG file. Someone must have (hopefully successfull) tried that before me.

Best regards,
Elmar

Brian Burkhalter

Please take a look at the link "JPEG EXIF and IPTC metadata" in the "Code"
section of this page:

http://java.sun.com/products/java-media/jai/utilities/jaiutils.html

In particular the referenced "metadata-extractor" classes might be of use.

Brian

On Wed, 30 Mar 2005 jai-interest@javadesktop.org wrote:

> Nope. It just doesn´t seem to work. I am not able to see any file comments, exif header. I can read some of the ImageMetadata but that only generates stuff like
>
> JPEGvariety
> app0JFIF
> markerSequence
> unknown
> unknown
> com
> dqt
> dqtable
> dqt
> dqtable...
>
> What I need is a working example of how to proberly pull additional file information and comments from a JPG file. Someone must have (hopefully successfull) tried that before me.
>
> Best regards,
> Elmar
> ---
> [Message sent by forum member 'Brokit' (Elmar)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=68440&#68440
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net