}
static inline const unsigned char *ReadResourceLong(const unsigned char *p,
- size_t *quantum)
+ unsigned int *quantum)
{
*quantum=(size_t) (*p++ << 24);
*quantum|=(size_t) (*p++ << 16);
unsigned char
length_byte;
- size_t
+ ssize_t
count;
+ unsigned int
+ value;
+
unsigned short
id;
p++;
if (p > (datum+length-4))
break;
- p=ReadResourceLong(p,&count);
+ p=ReadResourceLong(p,&value);
+ count=(ssize_t) value;
if ((p > (datum+length-count)) || (count > length))
break;
switch (id)
{
case 0x03ed:
{
- unsigned short
- units;
-
unsigned int
resolution;
+ unsigned short
+ units;
+
/*
Resolution.
*/
p=ReadResourceShort(p,&units)+2;
p=ReadResourceLong(p,&resolution)+4;
image->resolution.y=((double) resolution)/65536.0;
- // Values are always stored as pixels per inch.
- if ((ResolutionType) units == PixelsPerCentimeterResolution)
+ /*
+ Values are always stored as pixels per inch.
+ */
+ if ((ResolutionType) units != PixelsPerCentimeterResolution)
+ image->units=PixelsPerInchResolution;
+ else
{
image->units=PixelsPerCentimeterResolution;
image->resolution.x/=2.54;
image->resolution.y/=2.54;
}
- else
- image->units=PixelsPerInchResolution;
break;
}
case 0x0404:
if (SyncExifProfile(image,profile) == MagickFalse)
status=MagickFalse;
return(status);
-}
\ No newline at end of file
+}
#endif
for (x=0; x < (ssize_t) resize_image->columns; x++)
{
+ const int
+ id = GetOpenMPThreadId();
+
double
bisect,
density;
start=(ssize_t) MagickMax(bisect-support+0.5,0.0);
stop=(ssize_t) MagickMin(bisect+support+0.5,(double) image->columns);
density=0.0;
- contribution=contributions[GetOpenMPThreadId()];
+ contribution=contributions[id];
for (n=0; n < (stop-start); n++)
{
contribution[n].pixel=start+n;
#endif
for (y=0; y < (ssize_t) resize_image->rows; y++)
{
+ const int
+ id = GetOpenMPThreadId();
+
double
bisect,
density;
start=(ssize_t) MagickMax(bisect-support+0.5,0.0);
stop=(ssize_t) MagickMin(bisect+support+0.5,(double) image->rows);
density=0.0;
- contribution=contributions[GetOpenMPThreadId()];
+ contribution=contributions[id];
for (n=0; n < (stop-start); n++)
{
contribution[n].pixel=start+n;