On Mar 23, 2011, at 9:45 AM, Richard, Joel M wrote:
> Morning, all!
>
> I thought I'd crowdsource this question. 8+ hours of beating up on this and I
> haven't found a good solution.
>
> We have some software that processes the scanned pages of a book. They come
> to me as TIFF and I am converting to JP2 in order to upload to the Internet
> Archive. The trouble is that I can't find a reliable piece of code or a
> process to add XMP metadata to the JP2. (FWIW, we're using the Jasper library)
>
> - ImageMagick (PHP+Imagick) doesn't seem to support XMP in JP2 (or adding
> profiles to JP2 at all)
>
> - GraphicsMagick crashes with malloc errors on images that are too big, and I
> am unwilling to recompile to 64-bit and simply hope for the best. Our images
> are large, though, and something is dying between GM and Jasper.
>
> - exiftool doesn't seem to be working either.
>
> I'm working in PHP, so that would be a preferred language. If necessary I can
> always drop back to the command line to run a script or whatever.
>
> Is anyone else doing this type of thing? Any help or advice would be most
> welcome.
I've never used it, but exiv2 claims to support JP2 & XMP writing:
http://www.exiv2.org/
(not PHP directly, but could be called via the shell)
-Joe