Hi Christopher., XMP and EXIF are both stored in (different, both optional) APP1 segments of a Jpeg file. IPTC is stored in APP13 segments.
Both IPTC and XMP can and often are written into the same Jpeg file in these two separate locations. IPTC Information Interchange Model (the full name of IPTC) is a metadata standard developed by the International Press Telecommunications Council. My understanding is that the binary format for this metadata used in Jpeg files was designed and popularized by Adobe Photoshop, hence its photoshop-file-like structure. XMP data is an XML-based metadata format developed by Adobe that is in many ways redundant with (as it was intended to supercede) IPTC data. XMP is more open-ended and flexible than IPTC; IPTC data can be readily transformed into XMP format; not all XMP data can be transformed into IPTC. http://en.wikipedia.org/wiki/Extensible_Metadata_Platform http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council If you are reading IPTC and/or XMP data, I would suggest using the XMP if present; if not, using the IPTC. Charles On Thu, Aug 7, 2008 at 12:35 AM, Christopher Blunck <[EMAIL PROTECTED]> wrote: > Hi Charles. Isn't the xmp metadata stored in app13? I thought that xmp and > the other photoshop format were two ways to represent the same thing (iptc > metadata) stored in app13. Maybe I don't understand... > > Sent from my iPhone > > On Aug 6, 2008, at 4:29 PM, "Charles Matthew Chen" <[EMAIL PROTECTED]> > wrote: > >> Hi Christopher, >> >> This is an interesting question. >> >> Sanselan cannot read or write image data from JPEG files, so it >> can't be used to resize the images. However, it can be used to read >> and write metadata from existing JPEGs. It can currently write EXIF >> metadata, including copying EXIF data from one jpg to another (ie. the >> resized image file). It can also do this with XMP metadata. The >> ability to do something similar with IPTC metadata is under active >> development and should be ready soon. >> >> For an example of the EXIF update feature, see the >> changeExifMetadata() example in this file, which should be easily >> adapted to your needs: >> >> >> https://svn.apache.org/repos/asf/incubator/sanselan/trunk/src/examples/java/org/apache/sanselan/sampleUsage/WriteExifMetadataExample.java >> >> Charles >> >> >> On Tue, Aug 5, 2008 at 11:43 PM, Christopher Blunck >> <[EMAIL PROTECTED]> wrote: >>> >>> Hello, >>> >>> I have JFIF files that are rich in IPTC and EXIF metadata. I currently >>> use >>> JAI to resize those images to smaller sizes suitable for publishing on >>> the >>> web. Unfortunately when I perform that resizing in JAI I lose all of my >>> APP0-APP13 metadata. >>> >>> Can Sanselan help me? >>> >>> Can I resize images in Sanselan and preserve the original IPTC/EXIF >>> metadata? >>> >>> Alternatively can I read the IPTC/EXIF metadata contained in the APP >>> sections from my original files and merge it into the images that JAI >>> produces? >>> >>> I'm really stuck and I've been working on some prototype python code to >>> merge in JPEG sections at the byte[] level but it's not working. I've >>> reviewed a lot of material online and am familiar with some of the format >>> rules for JPEG/JFIF files. I've even written code that can harvest the >>> 0xFF >>> 0xED (APP13 section) metadata and drop it into another file that does not >>> contain 0xFF 0xED. Unfortunately I just did it at the top of the file >>> (immediately after 0xFF 0xD8) and I believe that 0xFF 0xE0 is always >>> supposed to immediately follow the SOS. I parsed out the length of the >>> 0xFF >>> 0xE0 section and tried inserting my APP13 section AFTER the 0xFF 0xE0 >>> section but that didn't work. >>> >>> Any pointers or directions would really be appreciated. >>> >>> >>> -c >>> >>> >
