List Info

Thread: XMP Embedding in TIFF, Bug?




XMP Embedding in TIFF, Bug?
country flaguser name
United States
2007-06-14 18:06:29
Hi Hubert,

I seem to have come across a bug in Adobe's code for
embedding XMP in
the TIFF format.  The spec[1] says that the XMLPacket tag
has type BYTE,
but Adobe assigns a type of UNDEFINED.  libtiff complains
and is unable
to read the XMP when given the wrong type.

In TIFF_Handler.cpp, changing

this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_UndefinedType,
this->xmpPacket.size(), this->xmpPacket.c_str() );

to

this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_ByteType,
this->xmpPacket.size(), this->xmpPacket.c_str() );

solves the problems I'm having.

This should be passed on to Adobe.  Do you know who to
contact to get
this fixed?

Cheers,
Jason

[1] http://www.awaresystems.be/imaging/tiff/tifftags/xmp.ht
ml

_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

Re: XMP Embedding in TIFF, Bug?
country flaguser name
United States
2007-06-14 18:29:03
Also, Adobe themselves specify this field to be of type
BYTE:

www.*adobe*.com/devnet/*xmp*/pdfs/*xmp*_*specification*.pdf
(page 92)

-Jason
> Hi Hubert,
>
> I seem to have come across a bug in Adobe's code for
embedding XMP in
> the TIFF format.  The spec[1] says that the XMLPacket
tag has type BYTE,
> but Adobe assigns a type of UNDEFINED.  libtiff
complains and is unable
> to read the XMP when given the wrong type.
>
> In TIFF_Handler.cpp, changing
>
> this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_UndefinedType,
> this->xmpPacket.size(), this->xmpPacket.c_str()
);
>
> to
>
> this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_ByteType,
> this->xmpPacket.size(), this->xmpPacket.c_str()
);
>
> solves the problems I'm having.
>
> This should be passed on to Adobe.  Do you know who to
contact to get
> this fixed?
>
> Cheers,
> Jason
>
> [1] http://www.awaresystems.be/imaging/tiff/tifftags/xmp.ht
ml
>
>
>   

_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

Re: XMP Embedding in TIFF, Bug?
country flaguser name
Canada
2007-06-14 20:43:55
Jason Kivlighn wrote:
> Hi Hubert,
> 
> I seem to have come across a bug in Adobe's code for
embedding XMP in
> the TIFF format.  The spec[1] says that the XMLPacket
tag has type BYTE,
> but Adobe assigns a type of UNDEFINED.  libtiff
complains and is unable
> to read the XMP when given the wrong type.
> 
> In TIFF_Handler.cpp, changing
> 
> this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_UndefinedType,
> this->xmpPacket.size(), this->xmpPacket.c_str()
);
> 
> to
> 
> this->tiffMgr.SetTag ( kTIFF_PrimaryIFD, kTIFF_XMP,
kTIFF_ByteType,
> this->xmpPacket.size(), this->xmpPacket.c_str()
);
> 
> solves the problems I'm having.
> 
> This should be passed on to Adobe.  Do you know who to
contact to get
> this fixed?

Nice patch. Will apply it.

As for sending the patches upstream, I have already a whole
set
including the one that allow building on Linux and the
brings 64-bits
compatibility... (yes code written in 2007 still does not
compile on
platform where sizeof(void*) != 4. I will add that one to
the list.

So far I still have to hear from them. I have asked both to
the PM and
the public forums who to send patches to, still have to get
an answer....


Hub
_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )