break;
components=(ssize_t) ((int) ReadPropertyLong(endian,q+4));
number_bytes=(size_t) components*tag_bytes[format];
+ if (number_bytes < components)
+ break; /* prevent overflow */
if (number_bytes <= 4)
p=q+8;
else
{
if (LocaleNCompare("fx:",property,3) == 0)
{
- fx_info=AcquireFxInfo(image,property+3);
+ fx_info=AcquireFxInfo(image,property+3,exception);
status=FxEvaluateChannelExpression(fx_info,IntensityPixelChannel,0,0,
&alpha,exception);
fx_info=DestroyFxInfo(fx_info);
pixel;
GetPixelInfo(image,&pixel);
- fx_info=AcquireFxInfo(image,property+6);
+ fx_info=AcquireFxInfo(image,property+6,exception);
status=FxEvaluateChannelExpression(fx_info,RedPixelChannel,0,0,
&alpha,exception);
pixel.red=(MagickRealType) QuantumRange*alpha;
}
break;
}
+ case 'r':
+ {
+ if (LocaleNCompare("resolution.x",property,11) == 0)
+ {
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ image->resolution.x);
+ break;
+ }
+ if (LocaleNCompare("resolution.y",property,11) == 0)
+ {
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ image->resolution.y);
+ break;
+ }
+ break;
+ }
case 's':
{
if (LocaleNCompare("size",property,4) == 0)
}
break;
}
- case 'x':
- {
- if (LocaleNCompare("xresolution",property,11) == 0)
- {
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
- image->resolution.x);
- break;
- }
- break;
- }
- case 'y':
- {
- if (LocaleNCompare("yresolution",property,11) == 0)
- {
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
- image->resolution.y);
- break;
- }
- break;
- }
case 'z':
{
if (LocaleNCompare("zero",property,4) == 0)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% InterpretImageProperties() replaces any embedded formatting characters with
-% the appropriate image property and returns the interpreted text.
+% the appropriate image property and returns the interpreted text. Free with
+% DestoryString() or RelinquishMagickMemory().
%
% The format of the InterpretImageProperties method is:
%