% July 1992 %
% %
% %
-% Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
}
if (info->signed_data == 1)
pixel_value-=32767;
- if (info->rescale)
+ index=pixel_value;
+ if (info->rescale != MagickFalse)
{
double
scaled_value;
scaled_value=pixel_value*info->rescale_slope+
info->rescale_intercept;
- if (info->window_width == 0)
- {
- index=(int) scaled_value;
- }
- else
+ index=(int) scaled_value;
+ if (info->window_width != 0)
{
double
window_max,
info->window_center-0.5)/(info->window_width-1))+0.5));
}
}
- else
- {
- index=pixel_value;
- }
index&=info->mask;
index=(int) ConstrainColormapIndex(image,(ssize_t) index,exception);
if (first_segment)
sequence=MagickTrue;
continue;
}
-
if ((unsigned int) ((group << 16) | element) == 0xFFFEE0DD)
{
if (data != (unsigned char *) NULL)
sequence=MagickFalse;
continue;
}
-
if (sequence != MagickFalse)
{
if (data != (unsigned char *) NULL)
data=(unsigned char *) RelinquishMagickMemory(data);
continue;
}
-
switch (group)
{
case 0x0002: