that would work for embedding comment tag into images which conform to JPEG and 
TIFF formats


if your requirement includes embedding tag into GIF image format you will want 
to consider Adobe XMP
https://docs.oracle.com/cd/B19306_01/appdev.102/b14302/ch_metadata.htm

5 Working with Metadata in Images - 
Oracle<https://docs.oracle.com/cd/B19306_01/appdev.102/b14302/ch_metadata.htm>
docs.oracle.com
5 Working with Metadata in Images. Image files can contain information about 
the content of the images, the image rasters, and image metadata. In general, 
data about data is referred to as metadata.


HTH

Martin
___________
________________________________
From: Bruno P. Kinoshita <brunodepau...@yahoo.com.br.INVALID>
Sent: Thursday, April 26, 2018 2:57 AM
To: Commons Users List
Subject: Re: [imaging] Comment tag problem

Hi Andrea,

The EXIF tags in imaging should match what's in this page:
https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
EXIF Tags - Queen's 
University<https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html>
sno.phy.queensu.ca
EXIF Tags. EXIF stands for "Exchangeable Image File Format". This type of 
information is formatted according to the TIFF specification, and may be found 
in JPG, TIFF, PNG, JP2, PGF, MIFF, HDP, PSP and XCF images, as well as many 
TIFF-based RAW images, and even some AVI and MOV videos.




Which contains the XPComment and UserComment tags you mentioned, but no 
equivalent to the other comment one.


If you really need to match that tag, then I think you should be able to create 
your own custom metadata entry.

I think [1] the ExifRewriter and its test class have some code that shows how 
to rewrite metadata. Find the directory (TiffOutputDirectory.java) with the 
metadata fields, perhaps remove the UserComment/XPComment if necessary, and 
then add a new field (TiffOutputField.java), with your metadata tag 
(TagInfo.java)


Hope that helps,
Bruno


[1]
https://github.com/apache/commons-imaging/blob/master/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java

________________________________
From: andrea antonello <andrea.antone...@gmail.com>
To: Commons Users List <user@commons.apache.org>
Sent: Thursday, 26 April 2018 1:46 AM
Subject: Re: [imaging] Comment tag problem



Hi Bruno,
thanks for your reply.

> I think you tried to include screenshots? If so, it doesn't work very well in 
> this mailing list.


ohh, I didn't figure and didn't notice.

>
> Could you try adding as attachment, or upload them, or use plain text to 
> describe the issue? I recently had to work on the tags for some TIFF & JPEG 
> metadata in [imaging], so hopefully we will be able to locate the right tag.


Fantastic. I investigated further but am still not able to solve this.

The tag I would like to update is one that produces (at least this is
what I read in the imagemagick image info) a section

Properties:

and under start section I find

comment: 
GEO-Information,46.5640616313:11.523790723,46.5640616313:11.5093674258,46.5585048222:11.523790723,46.5585048222:11.5093674258,0.000000

The most similar result I have been able to produce with the tags is:

exif:UserComment:GEO-Information,46.5640616313:11.523790723,46.5640616313:11.5093674258,46.5585048222:11.523790723,46.5585048222:11.5093674258,0.000000

and

exif:WinXP-Comments:GEO-Information,46.5640616313:11.523790723,46.5640616313:11.5093674258,46.5585048222:11.523790723,46.5585048222:11.5093674258,0.000000

both not the same as what i am looking for.


I have been able to print the following information through an
application called exifprobe:

@0x0000002=2       :    <JPEG_COM> length 137:
''GEO-Information,46.5640616313:11.523790723,46.5640616313:11.5093674258,46.5585048222:11.523790723,46.5585048222:11.5093674258,0.000000\0''
@0x000008d=141     :    <JPEG_APP0> 0xffe0 length 16, 'JFIF'
@0x0000096=150     :      Version       = 1.1
@0x0000098=152     :      Units         = 'dots/inch'
@0x0000099=153     :      Xdensity      = 96
@0x000009b=155     :      Ydensity      = 96
@0x000009d=157     :      XThumbnail    = 0
@0x000009e=158     :      YThumbnail    = 0
@0x000009e=158     :    </JPEG_APP0>
@0x000009f=159     :    <JPEG_DQT> length 67
@0x00000e4=228     :    <JPEG_DQT> length 67
@0x0000129=297     :    <JPEG_SOF_0> length 17, 8 bits/sample,
components=3, width=1608, height=901
@0x000013c=316     :    <JPEG_DHT> length 31 table class = 0 table id = 0
@0x000015d=349     :    <JPEG_DHT> length 181 table class = 0 table id = 1
@0x0000214=532     :    <JPEG_DHT> length 31 table class = 1 table id = 0
@0x0000235=565     :    <JPEG_DHT> length 181 table class = 1 table id = 1
@0x00002ec=748     :    <JPEG_SOS> length 12  start of JPEG data, 3
components 1448808 pixels
@0x006b1a4=438692  :  <JPEG_EOI> JPEG length 438694

So I think this (JPEG_COM) is not an exif tag as I had been told. I am
guessing this is reflected by the library's ComSegment class, but I
could not find any documentation or testcase which would tell me what
it is and how to rewrite/update it.

Any help is most appreciated,
Thanks,

Andrea




>
> CheersBruno
>
>
>       From: andrea antonello <andrea.antone...@gmail.com>
>  To: Commons Users List <user@commons.apache.org>
>  Sent: Wednesday, 25 April 2018 1:56 AM
>  Subject: [imaging] Comment tag problem
>
> Hi, I need some help to find the right tag to use to recreate a tag in a
> jpeg file.
>
> Here is the output of the info given by ImageMagick:
>
>
>
> The tag I need should be under "Properties"
> and be named: comment
>
> I have tried to use user_comment and xpcomment, but they produce something
> different, like:
>
>
>
> Can anyone tell me which tag I can use to generate the "comment" tag?
>
> Thanks for any hint,
> Best regards,
> Andrea
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to