*levels;
} QuantizationTable;
\f
+/*
+ Const declarations.
+*/
+static const char
+ *xmp_namespace = "http://ns.adobe.com/xap/1.0/ ";
+\f
/*
Forward declarations.
*/
*p++=(unsigned char) c;
}
error_manager->profile=NULL;
- iptc_profile=(StringInfo *) GetImageProfile(image,"8bim");
+ iptc_profile=(StringInfo *) GetImageProfile(image,"iptc");
if (iptc_profile != (StringInfo *) NULL)
{
ConcatenateStringInfo(iptc_profile,profile);
}
else
{
- status=SetImageProfile(image,"8bim",profile,exception);
+ status=SetImageProfile(image,"iptc",profile,exception);
profile=DestroyStringInfo(profile);
if (status == MagickFalse)
{
p=GetStringInfoDatum(profile);
if ((length > 4) && (LocaleNCompare((char *) p,"exif",4) == 0))
(void) CopyMagickString(name,"exif",MagickPathExtent);
- if ((length > 5) && (LocaleNCompare((char *) p,"http:",5) == 0))
+ if ((length > strlen(xmp_namespace)) &&
+ (LocaleNCompare((char *) p,xmp_namespace,strlen(xmp_namespace)) == 0))
{
ssize_t
j;
for (name=GetNextImageProfile(image); name != (const char *) NULL; )
{
profile=GetImageProfile(image,name);
+ length=GetStringInfoLength(profile);
+ if (LocaleNCompare(name,"APP",3) == 0)
+ {
+ int
+ id;
+
+ id=JPEG_APP0+StringToInteger(name+3);
+ for (i=0; i < (ssize_t) length; i+=65533L)
+ jpeg_write_marker(jpeg_info,id,GetStringInfoDatum(profile)+i,
+ MagickMin(length-i,65533));
+ }
if (LocaleCompare(name,"EXIF") == 0)
{
length=GetStringInfoLength(profile);
/*
Add namespace to XMP profile.
*/
- xmp_profile=StringToStringInfo("http://ns.adobe.com/xap/1.0/ ");
+ xmp_profile=StringToStringInfo(xmp_namespace);
if (xmp_profile != (StringInfo *) NULL)
{
if (profile != (StringInfo *) NULL)