Lines Matching refs:image
244 static void Rd_WP_DWORD(Image *image,size_t *d) in Rd_WP_DWORD() argument
249 b=ReadBlobByte(image); in Rd_WP_DWORD()
253 b=ReadBlobByte(image); in Rd_WP_DWORD()
255 b=ReadBlobByte(image); in Rd_WP_DWORD()
260 b=ReadBlobByte(image); in Rd_WP_DWORD()
262 b=ReadBlobByte(image); in Rd_WP_DWORD()
267 static MagickBooleanType InsertRow(Image *image,unsigned char *p,ssize_t y, in InsertRow() argument
282 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in InsertRow()
289 for (x=0; x < ((ssize_t) image->columns-7); x+=8) in InsertRow()
294 SetPixelIndex(image,index,q); in InsertRow()
295 if (index < image->colors) in InsertRow()
296 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
297 q+=GetPixelChannels(image); in InsertRow()
301 if ((image->columns % 8) != 0) in InsertRow()
303 for (bit=0; bit < (ssize_t) (image->columns % 8); bit++) in InsertRow()
306 SetPixelIndex(image,index,q); in InsertRow()
307 if (index < image->colors) in InsertRow()
308 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
309 q+=GetPixelChannels(image); in InsertRow()
317 for (x=0; x < ((ssize_t) image->columns-3); x+=4) in InsertRow()
319 index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception); in InsertRow()
320 SetPixelIndex(image,index,q); in InsertRow()
321 if (index < image->colors) in InsertRow()
322 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
323 q+=GetPixelChannels(image); in InsertRow()
324 index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception); in InsertRow()
325 SetPixelIndex(image,index,q); in InsertRow()
326 if (index < image->colors) in InsertRow()
327 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
328 q+=GetPixelChannels(image); in InsertRow()
329 index=ConstrainColormapIndex(image,(*p >> 2) & 0x3,exception); in InsertRow()
330 SetPixelIndex(image,index,q); in InsertRow()
331 if (index < image->colors) in InsertRow()
332 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
333 q+=GetPixelChannels(image); in InsertRow()
334 index=ConstrainColormapIndex(image,(*p) & 0x3,exception); in InsertRow()
335 SetPixelIndex(image,index,q); in InsertRow()
336 if (index < image->colors) in InsertRow()
337 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
338 q+=GetPixelChannels(image); in InsertRow()
341 if ((image->columns % 4) != 0) in InsertRow()
343 index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception); in InsertRow()
344 SetPixelIndex(image,index,q); in InsertRow()
345 if (index < image->colors) in InsertRow()
346 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
347 q+=GetPixelChannels(image); in InsertRow()
348 if ((image->columns % 4) > 1) in InsertRow()
350 index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception); in InsertRow()
351 SetPixelIndex(image,index,q); in InsertRow()
352 if (index < image->colors) in InsertRow()
353 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
354 q+=GetPixelChannels(image); in InsertRow()
355 if ((image->columns % 4) > 2) in InsertRow()
357 index=ConstrainColormapIndex(image,(*p >> 2) & 0x3, in InsertRow()
359 SetPixelIndex(image,index,q); in InsertRow()
360 if (index < image->colors) in InsertRow()
361 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) in InsertRow()
363 q+=GetPixelChannels(image); in InsertRow()
373 for (x=0; x < ((ssize_t) image->columns-1); x+=2) in InsertRow()
375 index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception); in InsertRow()
376 SetPixelIndex(image,index,q); in InsertRow()
377 if (index < image->colors) in InsertRow()
378 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
379 q+=GetPixelChannels(image); in InsertRow()
380 index=ConstrainColormapIndex(image,(*p) & 0x0f,exception); in InsertRow()
381 SetPixelIndex(image,index,q); in InsertRow()
382 if (index < image->colors) in InsertRow()
383 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
385 q+=GetPixelChannels(image); in InsertRow()
387 if ((image->columns % 2) != 0) in InsertRow()
389 index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception); in InsertRow()
390 SetPixelIndex(image,index,q); in InsertRow()
391 if (index < image->colors) in InsertRow()
392 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
394 q+=GetPixelChannels(image); in InsertRow()
400 for (x=0; x < (ssize_t) image->columns; x++) in InsertRow()
402 index=ConstrainColormapIndex(image,*p,exception); in InsertRow()
403 SetPixelIndex(image,index,q); in InsertRow()
404 if (index < image->colors) in InsertRow()
405 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in InsertRow()
407 q+=GetPixelChannels(image); in InsertRow()
413 for (x=0; x < (ssize_t) image->columns; x++) in InsertRow()
415 SetPixelRed(image,ScaleCharToQuantum(*p++),q); in InsertRow()
416 SetPixelGreen(image,ScaleCharToQuantum(*p++),q); in InsertRow()
417 SetPixelBlue(image,ScaleCharToQuantum(*p++),q); in InsertRow()
418 q+=GetPixelChannels(image); in InsertRow()
422 if (!SyncAuthenticPixels(image,exception)) in InsertRow()
435 if (InsertRow(image,BImgBuff,(ssize_t) y,bpp,exception) != MagickFalse) \
441 static int UnpackWPGRaster(Image *image,int bpp,ExceptionInfo *exception) in UnpackWPGRaster() argument
459 ldblk=(ssize_t) ((bpp*image->columns+7)/8); in UnpackWPGRaster()
465 while(y<(ssize_t) image->rows) in UnpackWPGRaster()
470 c=ReadBlobByte(image); in UnpackWPGRaster()
479 bbuf=ReadBlobByte(image); in UnpackWPGRaster()
483 c=ReadBlobByte(image); in UnpackWPGRaster()
495 c=ReadBlobByte(image); in UnpackWPGRaster()
502 c=ReadBlobByte(image); in UnpackWPGRaster()
519 if(y>(ssize_t) image->rows) in UnpackWPGRaster()
524 if (InsertRow(image,BImgBuff,y-1,bpp,exception) == MagickFalse) in UnpackWPGRaster()
532 if (EOFBlob(image) != MagickFalse) in UnpackWPGRaster()
536 return(y <(ssize_t) image->rows ? -5 : 0); in UnpackWPGRaster()
552 if (InsertRow(image,BImgBuff,(ssize_t) y,bpp,exception) != MagickFalse) \
558 static int UnpackWPG2Raster(Image *image,int bpp,ExceptionInfo *exception) in UnpackWPG2Raster() argument
584 ldblk=(ssize_t) ((bpp*image->columns+7)/8); in UnpackWPG2Raster()
591 while( y< image->rows) in UnpackWPG2Raster()
593 bbuf=ReadBlobByte(image); in UnpackWPG2Raster()
598 SampleSize=ReadBlobByte(image); /* DSZ */ in UnpackWPG2Raster()
617 RunCount=ReadBlobByte(image); /* BLK */ in UnpackWPG2Raster()
626 RunCount=ReadBlobByte(image); /* EXT */ in UnpackWPG2Raster()
634 RunCount=ReadBlobByte(image); /* RST */ in UnpackWPG2Raster()
649 …if (InsertRow(image,BImgBuff,(ssize_t) (image->rows > y ? y : image->rows-1),bpp,exception) == Mag… in UnpackWPG2Raster()
659 RunCount=ReadBlobByte(image); /* WHT */ in UnpackWPG2Raster()
673 SampleBuffer[i]=ReadBlobByte(image); in UnpackWPG2Raster()
681 bbuf=ReadBlobByte(image); in UnpackWPG2Raster()
686 if (EOFBlob(image) != MagickFalse) in UnpackWPG2Raster()
696 static unsigned LoadWPG2Flags(Image *image,char Precision,float *Angle,tCTM *CTM) in LoadWPG2Flags() argument
708 Flags=ReadBlobLSBShort(image); in LoadWPG2Flags()
709 if(Flags & LCK) (void) ReadBlobLSBLong(image); /*Edit lock*/ in LoadWPG2Flags()
713 {(void) ReadBlobLSBShort(image);} /*ObjectID*/ in LoadWPG2Flags()
715 {(void) ReadBlobLSBLong(image);} /*ObjectID (Double precision)*/ in LoadWPG2Flags()
719 x=ReadBlobLSBLong(image); /*Rot Angle*/ in LoadWPG2Flags()
724 x=ReadBlobLSBLong(image); /*Sx*cos()*/ in LoadWPG2Flags()
726 x=ReadBlobLSBLong(image); /*Sy*cos()*/ in LoadWPG2Flags()
731 x=ReadBlobLSBLong(image); /*Kx*sin()*/ in LoadWPG2Flags()
733 x=ReadBlobLSBLong(image); /*Ky*sin()*/ in LoadWPG2Flags()
738 x=ReadBlobLSBLong(image); DenX=ReadBlobLSBShort(image); /*Tx*/ in LoadWPG2Flags()
741 x=ReadBlobLSBLong(image); DenX=ReadBlobLSBShort(image); /*Ty*/ in LoadWPG2Flags()
748 x=ReadBlobLSBShort(image); DenX=ReadBlobLSBShort(image); /*Px*/ in LoadWPG2Flags()
750 x=ReadBlobLSBShort(image); DenX=ReadBlobLSBShort(image); /*Py*/ in LoadWPG2Flags()
757 static Image *ExtractPostscript(Image *image,const ImageInfo *image_info, in ExtractPostscript() argument
788 return(image); in ExtractPostscript()
800 if (SeekBlob(image,PS_Offset,SEEK_SET) != PS_Offset) in ExtractPostscript()
804 image->filename); in ExtractPostscript()
807 count=ReadBlob(image, 2*MagickPathExtent, magick); in ExtractPostscript()
812 image->filename); in ExtractPostscript()
816 if (SeekBlob(image,PS_Offset,SEEK_SET) != PS_Offset) in ExtractPostscript()
820 image->filename); in ExtractPostscript()
825 c=ReadBlobByte(image); in ExtractPostscript()
830 image->filename); in ExtractPostscript()
847 image->filename); in ExtractPostscript()
876 (void) CopyMagickString(p->filename,image->filename,MagickPathExtent); in ExtractPostscript()
877 (void) CopyMagickString(p->magick_filename,image->magick_filename, in ExtractPostscript()
879 (void) CopyMagickString(p->magick,image->magick,MagickPathExtent); in ExtractPostscript()
892 p->blob=ReferenceBlob(image->blob); in ExtractPostscript()
898 if ((image->rows == 0 || image->columns == 0) && in ExtractPostscript()
899 (image->previous != NULL || image->next != NULL)) in ExtractPostscript()
901 DeleteImageFromList(&image); in ExtractPostscript()
904 AppendImageToList(&image,image2); in ExtractPostscript()
905 while (image->next != NULL) in ExtractPostscript()
906 image=image->next; in ExtractPostscript()
914 return(DestroyImageList(image)); in ExtractPostscript()
915 return(image); in ExtractPostscript()
1030 *image; in ReadWPGImage() local
1082 image=AcquireImage(image_info,exception); in ReadWPGImage()
1083 image->depth=8; in ReadWPGImage()
1084 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadWPGImage()
1087 image=DestroyImageList(image); in ReadWPGImage()
1093 Header.FileId=ReadBlobLSBLong(image); in ReadWPGImage()
1094 Header.DataOffset=(MagickOffsetType) ReadBlobLSBLong(image); in ReadWPGImage()
1095 Header.ProductType=ReadBlobLSBShort(image); in ReadWPGImage()
1096 Header.FileType=ReadBlobLSBShort(image); in ReadWPGImage()
1097 Header.MajorVersion=ReadBlobByte(image); in ReadWPGImage()
1098 Header.MinorVersion=ReadBlobByte(image); in ReadWPGImage()
1099 Header.EncryptKey=ReadBlobLSBShort(image); in ReadWPGImage()
1100 Header.Reserved=ReadBlobLSBShort(image); in ReadWPGImage()
1107 image->columns = 1; in ReadWPGImage()
1108 image->rows = 1; in ReadWPGImage()
1109 image->colors = 0; in ReadWPGImage()
1110 image->storage_class=DirectClass; in ReadWPGImage()
1111 (void) ResetImagePixels(image,exception); in ReadWPGImage()
1119 while(!EOFBlob(image)) /* object parser loop */ in ReadWPGImage()
1121 if (SeekBlob(image,Header.DataOffset,SEEK_SET) != Header.DataOffset) in ReadWPGImage()
1123 if(EOFBlob(image)) in ReadWPGImage()
1126 Rec.RecType=(i=ReadBlobByte(image)); in ReadWPGImage()
1129 Rd_WP_DWORD(image,&Rec.RecordLength); in ReadWPGImage()
1130 if (Rec.RecordLength > GetBlobSize(image)) in ReadWPGImage()
1132 if(EOFBlob(image)) in ReadWPGImage()
1135 Header.DataOffset=TellBlob(image)+Rec.RecordLength; in ReadWPGImage()
1140 BitmapHeader1.Width=ReadBlobLSBShort(image); in ReadWPGImage()
1141 BitmapHeader1.Height=ReadBlobLSBShort(image); in ReadWPGImage()
1144 BitmapHeader1.Depth=ReadBlobLSBShort(image); in ReadWPGImage()
1145 BitmapHeader1.HorzRes=ReadBlobLSBShort(image); in ReadWPGImage()
1146 BitmapHeader1.VertRes=ReadBlobLSBShort(image); in ReadWPGImage()
1150 image->units=PixelsPerCentimeterResolution; in ReadWPGImage()
1151 image->resolution.x=BitmapHeader1.HorzRes/470.0; in ReadWPGImage()
1152 image->resolution.y=BitmapHeader1.VertRes/470.0; in ReadWPGImage()
1154 image->columns=BitmapHeader1.Width; in ReadWPGImage()
1155 image->rows=BitmapHeader1.Height; in ReadWPGImage()
1161 WPG_Palette.StartIndex=ReadBlobLSBShort(image); in ReadWPGImage()
1162 WPG_Palette.NumOfEntries=ReadBlobLSBShort(image); in ReadWPGImage()
1168 image->colors=WPG_Palette.NumOfEntries; in ReadWPGImage()
1169 if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) in ReadWPGImage()
1174 image->colormap[i].red=ScaleCharToQuantum((unsigned char) in ReadWPGImage()
1175 ReadBlobByte(image)); in ReadWPGImage()
1176 image->colormap[i].green=ScaleCharToQuantum((unsigned char) in ReadWPGImage()
1177 ReadBlobByte(image)); in ReadWPGImage()
1178 image->colormap[i].blue=ScaleCharToQuantum((unsigned char) in ReadWPGImage()
1179 ReadBlobByte(image)); in ReadWPGImage()
1186 image=ExtractPostscript(image,image_info, in ReadWPGImage()
1187 TellBlob(image)+8, /* skip PS header in the wpg */ in ReadWPGImage()
1189 if (image == NULL) in ReadWPGImage()
1196 BitmapHeader2.RotAngle=ReadBlobLSBShort(image); in ReadWPGImage()
1197 BitmapHeader2.LowLeftX=ReadBlobLSBShort(image); in ReadWPGImage()
1198 BitmapHeader2.LowLeftY=ReadBlobLSBShort(image); in ReadWPGImage()
1199 BitmapHeader2.UpRightX=ReadBlobLSBShort(image); in ReadWPGImage()
1200 BitmapHeader2.UpRightY=ReadBlobLSBShort(image); in ReadWPGImage()
1201 BitmapHeader2.Width=ReadBlobLSBShort(image); in ReadWPGImage()
1202 BitmapHeader2.Height=ReadBlobLSBShort(image); in ReadWPGImage()
1205 BitmapHeader2.Depth=ReadBlobLSBShort(image); in ReadWPGImage()
1206 BitmapHeader2.HorzRes=ReadBlobLSBShort(image); in ReadWPGImage()
1207 BitmapHeader2.VertRes=ReadBlobLSBShort(image); in ReadWPGImage()
1209 image->units=PixelsPerCentimeterResolution; in ReadWPGImage()
1210 image->page.width=(unsigned int) in ReadWPGImage()
1212 image->page.height=(unsigned int) in ReadWPGImage()
1214 image->page.x=(int) (BitmapHeader2.LowLeftX/470.0); in ReadWPGImage()
1215 image->page.y=(int) (BitmapHeader2.LowLeftX/470.0); in ReadWPGImage()
1218 image->resolution.x=BitmapHeader2.HorzRes/470.0; in ReadWPGImage()
1219 image->resolution.y=BitmapHeader2.VertRes/470.0; in ReadWPGImage()
1221 image->columns=BitmapHeader2.Width; in ReadWPGImage()
1222 image->rows=BitmapHeader2.Height; in ReadWPGImage()
1226 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadWPGImage()
1229 (void) ResetImagePixels(image,exception); in ReadWPGImage()
1230 if ((image->storage_class != PseudoClass) && (bpp < 24)) in ReadWPGImage()
1232 image->colors=one << bpp; in ReadWPGImage()
1233 if (image->colors > GetBlobSize(image)) in ReadWPGImage()
1236 if (!AcquireImageColormap(image,image->colors,exception)) in ReadWPGImage()
1243 for (i=0; (i < (int) image->colors) && (i < 256); i++) in ReadWPGImage()
1245 image->colormap[i].red=ScaleCharToQuantum(WPG1_Palette[i].Red); in ReadWPGImage()
1246 image->colormap[i].green=ScaleCharToQuantum(WPG1_Palette[i].Green); in ReadWPGImage()
1247 image->colormap[i].blue=ScaleCharToQuantum(WPG1_Palette[i].Blue); in ReadWPGImage()
1248 image->colormap[i].alpha=OpaqueAlpha; in ReadWPGImage()
1254 if ( (image->colors < (one << bpp)) && (bpp != 24) ) in ReadWPGImage()
1262 colormap=image->colormap; in ReadWPGImage()
1263 colors=image->colors; in ReadWPGImage()
1264 image->colormap=(PixelInfo *) NULL; in ReadWPGImage()
1265 if (AcquireImageColormap(image,one << bpp,exception) == MagickFalse) in ReadWPGImage()
1271 (void) memcpy(image->colormap,colormap,MagickMin( in ReadWPGImage()
1272 image->colors,colors)*sizeof(*image->colormap)); in ReadWPGImage()
1278 if ((bpp == 1) && (image->colors > 1)) in ReadWPGImage()
1280 if(image->colormap[0].red==0 && in ReadWPGImage()
1281 image->colormap[0].green==0 && in ReadWPGImage()
1282 image->colormap[0].blue==0 && in ReadWPGImage()
1283 image->colormap[1].red==0 && in ReadWPGImage()
1284 image->colormap[1].green==0 && in ReadWPGImage()
1285 image->colormap[1].blue==0) in ReadWPGImage()
1287 image->colormap[1].red = in ReadWPGImage()
1288 image->colormap[1].green = in ReadWPGImage()
1289 image->colormap[1].blue = QuantumRange; in ReadWPGImage()
1290 image->colormap[1].alpha=OpaqueAlpha; in ReadWPGImage()
1294 if(UnpackWPGRaster(image,bpp,exception) < 0) in ReadWPGImage()
1309 flop_image = FlopImage(image, exception); in ReadWPGImage()
1311 DuplicateBlob(flop_image,image); in ReadWPGImage()
1312 ReplaceImageInList(&image,flop_image); in ReadWPGImage()
1321 flip_image = FlipImage(image, exception); in ReadWPGImage()
1323 DuplicateBlob(flip_image,image); in ReadWPGImage()
1324 ReplaceImageInList(&image,flip_image); in ReadWPGImage()
1333 rotate_image=RotateImage(image,(BitmapHeader2.RotAngle & in ReadWPGImage()
1336 DuplicateBlob(rotate_image,image); in ReadWPGImage()
1337 ReplaceImageInList(&image,rotate_image); in ReadWPGImage()
1345 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadWPGImage()
1347 AcquireNextImage(image_info,image,exception); in ReadWPGImage()
1348 image->depth=8; in ReadWPGImage()
1349 if (image->next == (Image *) NULL) in ReadWPGImage()
1351 image=SyncNextImageInList(image); in ReadWPGImage()
1352 image->columns=image->rows=0; in ReadWPGImage()
1353 image->colors=0; in ReadWPGImage()
1359 image=ExtractPostscript(image,image_info, in ReadWPGImage()
1360 TellBlob(image)+0x3C, /* skip PS l2 header in the wpg */ in ReadWPGImage()
1362 if (image == NULL) in ReadWPGImage()
1374 while(!EOFBlob(image)) /* object parser loop */ in ReadWPGImage()
1376 if (SeekBlob(image,Header.DataOffset,SEEK_SET) != Header.DataOffset) in ReadWPGImage()
1378 if (EOFBlob(image)) in ReadWPGImage()
1381 Rec2.Class=(i=ReadBlobByte(image)); in ReadWPGImage()
1384 Rec2.RecType=(i=ReadBlobByte(image)); in ReadWPGImage()
1387 Rd_WP_DWORD(image,&Rec2.Extension); in ReadWPGImage()
1388 Rd_WP_DWORD(image,&Rec2.RecordLength); in ReadWPGImage()
1389 if(EOFBlob(image)) in ReadWPGImage()
1392 Header.DataOffset=TellBlob(image)+Rec2.RecordLength; in ReadWPGImage()
1397 StartWPG.HorizontalUnits=ReadBlobLSBShort(image); in ReadWPGImage()
1398 StartWPG.VerticalUnits=ReadBlobLSBShort(image); in ReadWPGImage()
1399 StartWPG.PosSizePrecision=ReadBlobByte(image); in ReadWPGImage()
1402 WPG_Palette.StartIndex=ReadBlobLSBShort(image); in ReadWPGImage()
1403 WPG_Palette.NumOfEntries=ReadBlobLSBShort(image); in ReadWPGImage()
1409 image->colors=WPG_Palette.NumOfEntries; in ReadWPGImage()
1410 if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) in ReadWPGImage()
1416 image->colormap[i].red=ScaleCharToQuantum((char) in ReadWPGImage()
1417 ReadBlobByte(image)); in ReadWPGImage()
1418 image->colormap[i].green=ScaleCharToQuantum((char) in ReadWPGImage()
1419 ReadBlobByte(image)); in ReadWPGImage()
1420 image->colormap[i].blue=ScaleCharToQuantum((char) in ReadWPGImage()
1421 ReadBlobByte(image)); in ReadWPGImage()
1422 image->colormap[i].alpha=OpaqueAlpha; in ReadWPGImage()
1423 (void) ReadBlobByte(image); /*Opacity??*/ in ReadWPGImage()
1427 Bitmap2Header1.Width=ReadBlobLSBShort(image); in ReadWPGImage()
1428 Bitmap2Header1.Height=ReadBlobLSBShort(image); in ReadWPGImage()
1431 Bitmap2Header1.Depth=ReadBlobByte(image); in ReadWPGImage()
1432 Bitmap2Header1.Compression=ReadBlobByte(image); in ReadWPGImage()
1456 image->columns=Bitmap2Header1.Width; in ReadWPGImage()
1457 image->rows=Bitmap2Header1.Height; in ReadWPGImage()
1459 return(image); in ReadWPGImage()
1460 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadWPGImage()
1462 status=ResetImagePixels(image,exception); in ReadWPGImage()
1465 if ((image->colors == 0) && (bpp != 24)) in ReadWPGImage()
1467 image->colors=one << bpp; in ReadWPGImage()
1468 if (!AcquireImageColormap(image,image->colors,exception)) in ReadWPGImage()
1474 if( image->colors<(one << bpp) && bpp!=24 ) in ReadWPGImage()
1475 image->colormap=(PixelInfo *) ResizeQuantumMemory( in ReadWPGImage()
1476 image->colormap,(size_t) (one << bpp), in ReadWPGImage()
1477 sizeof(*image->colormap)); in ReadWPGImage()
1485 ldblk=(ssize_t) ((bpp*image->columns+7)/8); in ReadWPGImage()
1490 for (i=0; i< (ssize_t) image->rows; i++) in ReadWPGImage()
1495 count=ReadBlob(image,(size_t) ldblk,BImgBuff); in ReadWPGImage()
1498 if (InsertRow(image,BImgBuff,i,bpp,exception) == MagickFalse) in ReadWPGImage()
1502 if (i < (ssize_t) image->rows) in ReadWPGImage()
1508 if( UnpackWPG2Raster(image,bpp,exception) < 0) in ReadWPGImage()
1519 flop_image = FlopImage(image, exception); in ReadWPGImage()
1521 DuplicateBlob(flop_image,image); in ReadWPGImage()
1522 ReplaceImageInList(&image,flop_image); in ReadWPGImage()
1535 flip_image = FlipImage(image, exception); in ReadWPGImage()
1537 DuplicateBlob(flip_image,image); in ReadWPGImage()
1538 ReplaceImageInList(&image,flip_image); in ReadWPGImage()
1552 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadWPGImage()
1554 AcquireNextImage(image_info,image,exception); in ReadWPGImage()
1555 image->depth=8; in ReadWPGImage()
1556 if (image->next == (Image *) NULL) in ReadWPGImage()
1558 image=SyncNextImageInList(image); in ReadWPGImage()
1559 image->columns=image->rows=0; in ReadWPGImage()
1560 image->colors=0; in ReadWPGImage()
1564 i=ReadBlobLSBShort(image); in ReadWPGImage()
1567 image=ExtractPostscript(image,image_info, in ReadWPGImage()
1568 TellBlob(image)+i, /*skip PS header in the wpg2*/ in ReadWPGImage()
1570 if (image == NULL) in ReadWPGImage()
1577 WPG2Flags = LoadWPG2Flags(image,StartWPG.PosSizePrecision,NULL,&CTM); in ReadWPGImage()
1592 (void) CloseBlob(image); in ReadWPGImage()
1604 p=image; in ReadWPGImage()
1605 image=NULL; in ReadWPGImage()
1613 image=p; in ReadWPGImage()
1620 for (p=image; p != (Image *) NULL; p=p->next) in ReadWPGImage()
1623 if (image == (Image *) NULL) in ReadWPGImage()
1626 return(image); in ReadWPGImage()