break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- q->blue=ScaleCharToQuantum(*p++);
- q->green=ScaleCharToQuantum(*p++);
- q->red=ScaleCharToQuantum(*p++);
- if (*p == 0)
- *p=1;
- q->opacity=(Quantum) (QuantumRange-ScaleCharToQuantum(*p));
+ SetBluePixelComponent(q,ScaleCharToQuantum(*p++));
+ SetGreenPixelComponent(q,ScaleCharToQuantum(*p++));
+ SetRedPixelComponent(q,ScaleCharToQuantum(*p++));
+ if (*p == 254)
+ *p=255;
+ SetOpacityPixelComponent(q,(QuantumRange-
+ ScaleCharToQuantum(*p++)));
if (q->opacity != OpaqueOpacity)
image->matte=MagickTrue;
- p++;
q++;
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
- if ((image->previous == (Image *) NULL) &&
- (SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,image->rows) == MagickFalse))
- break;
+ if (image->previous == (Image *) NULL)
+ {
+ status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
+ image->rows);
+ if (status == MagickFalse)
+ break;
+ }
}
pixels=(unsigned char *) RelinquishMagickMemory(pixels);
if (EOFBlob(image) != MagickFalse)
*q++=ScaleQuantumToChar(GetBluePixelComponent(p));
*q++=ScaleQuantumToChar(GetGreenPixelComponent(p));
*q++=ScaleQuantumToChar(GetRedPixelComponent(p));
- *q=ScaleQuantumToChar((Quantum) (QuantumRange-
- (image->matte != MagickFalse ? p->opacity : OpaqueOpacity)));
+ *q=ScaleQuantumToChar((Quantum) (QuantumRange-(image->matte !=
+ MagickFalse ? GetOpacityPixelComponent(p) : OpaqueOpacity)));
if (*q == 255)
*q=254;
p++;
count=WriteBlob(image,(size_t) (q-pixels),pixels);
if (count != (ssize_t) (q-pixels))
break;
- if ((image->previous == (Image *) NULL) &&
- (SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,image->rows) == MagickFalse))
- break;
+ if (image->previous == (Image *) NULL)
+ {
+ status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
+ image->rows);
+ if (status == MagickFalse)
+ break;
+ }
}
pixels=(unsigned char *) RelinquishMagickMemory(pixels);
if (GetNextImageInList(image) == (Image *) NULL)