* Add context to -border for montage. Inside the parenthesis it adds a border
to the image otherwise it sets the border for the layout manager.
* 24-bit BMP images are not colormapped even if header colors != 0.
+ * Set DPX user data like this: -set profile dpx:userdata.txt.
2010-05-15 6.6.1-10 Cristy <quetzlzacatenango@image...>
* Use ScaleCharToQuantum() in coders/src.c (reference
profile=AcquireStringInfo(dpx.file.user_size-sizeof(dpx.user.id));
offset+=ReadBlob(image,GetStringInfoLength(profile),
GetStringInfoDatum(profile));
- (void) SetImageProfile(image,"dpx:user.data",profile);
+ (void) SetImageProfile(image,"dpx",profile);
profile=DestroyStringInfo(profile);
}
}
dpx.file.magic=0x53445058U;
offset+=WriteBlobLong(image,dpx.file.magic);
dpx.file.image_offset=0x2000U;
- profile=GetImageProfile(image,"dpx:user.data");
+ profile=GetImageProfile(image,"dpx");
if (profile != (StringInfo *) NULL)
{
+ if (GetStringInfoLength(profile) > 1048576)
+ ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
dpx.file.image_offset+=(unsigned int) GetStringInfoLength(profile);
dpx.file.image_offset=(((dpx.file.image_offset+0x2000-1)/0x2000)*0x2000);
}
#if !defined(MAGICKCORE_HDRI_SUPPORT)
if ((pixel->red == pixel->green) && (pixel->green == pixel->blue))
return(pixel->red);
-#if (MAGICKCORE_QUANTUM_DEPTH <= 16)
- return((Quantum) ((306U*(unsigned int) pixel->red+
- 601U*(unsigned int) pixel->green+117U*(unsigned int) pixel->blue) >> 10U));
-#else
return((Quantum) (0.299*pixel->red+0.587*pixel->green+0.114*pixel->blue+0.5));
-#endif
#else
if ((fabs(pixel->red-pixel->green) <= MagickEpsilon) &&
(fabs(pixel->green-pixel->blue) <= MagickEpsilon))
static inline QuantumAny ScaleQuantumToAny(const Quantum quantum,
const QuantumAny range)
{
- return((QuantumAny) (((MagickRealType) range*quantum)/QuantumRange+0.5));
+ return((QuantumAny) (((MagickRealType) range*quantum)/QuantumRange)+0.5);
}
#if (MAGICKCORE_QUANTUM_DEPTH == 8)