loop=LocaleNCompare((char *) buffer,"NETSCAPE2.0",11) == 0 ?
MagickTrue : MagickFalse;
if (loop != MagickFalse)
+ while (ReadBlobBlock(image,buffer) != 0)
{
- while (ReadBlobBlock(image,buffer) != 0)
- iterations=(size_t) ((buffer[2] << 8) | buffer[1]);
- break;
+ iterations=(size_t) ((buffer[2] << 8) | buffer[1]);
+ if (iterations != 0)
+ iterations++;
}
else
{
(void) WriteBlob(image,11,(unsigned char *) "NETSCAPE2.0");
(void) WriteBlobByte(image,(unsigned char) 0x03);
(void) WriteBlobByte(image,(unsigned char) 0x01);
- (void) WriteBlobLSBShort(image,(unsigned short) image->iterations);
+ (void) WriteBlobLSBShort(image,(unsigned short) (image->iterations ? image->iterations - 1 : 0));
(void) WriteBlobByte(image,(unsigned char) 0x00);
}
if ((image->gamma != 1.0f/2.2f))