Lines Matching refs:image

204   Image *image,Image *inject_image,ExceptionInfo *exception)  in Huffman2DEncodeImage()  argument
234 if (WriteBlob(image,length,group4) != (ssize_t) length) in Huffman2DEncodeImage()
241 Image *image,MemoryInfo **pixel_info,size_t *length,ExceptionInfo *exception) in SerializeImage() argument
258 assert(image != (Image *) NULL); in SerializeImage()
259 assert(image->signature == MagickCoreSignature); in SerializeImage()
260 if (image->debug != MagickFalse) in SerializeImage()
261 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in SerializeImage()
263 *length=(image->colorspace == CMYKColorspace ? 4 : 3)*(size_t) in SerializeImage()
264 image->columns*image->rows; in SerializeImage()
269 for (y=0; y < (ssize_t) image->rows; y++) in SerializeImage()
271 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in SerializeImage()
274 if (image->colorspace != CMYKColorspace) in SerializeImage()
275 for (x=0; x < (ssize_t) image->columns; x++) in SerializeImage()
277 *q++=ScaleQuantumToChar(GetPixelRed(image,p)); in SerializeImage()
278 *q++=ScaleQuantumToChar(GetPixelGreen(image,p)); in SerializeImage()
279 *q++=ScaleQuantumToChar(GetPixelBlue(image,p)); in SerializeImage()
280 p+=GetPixelChannels(image); in SerializeImage()
283 for (x=0; x < (ssize_t) image->columns; x++) in SerializeImage()
285 *q++=ScaleQuantumToChar(GetPixelRed(image,p)); in SerializeImage()
286 *q++=ScaleQuantumToChar(GetPixelGreen(image,p)); in SerializeImage()
287 *q++=ScaleQuantumToChar(GetPixelBlue(image,p)); in SerializeImage()
288 *q++=ScaleQuantumToChar(GetPixelBlack(image,p)); in SerializeImage()
289 p+=GetPixelChannels(image); in SerializeImage()
291 if (image->previous == (Image *) NULL) in SerializeImage()
293 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in SerializeImage()
294 image->rows); in SerializeImage()
305 Image *image,MemoryInfo **pixel_info,size_t *length,ExceptionInfo *exception) in SerializeImageChannel() argument
330 assert(image != (Image *) NULL); in SerializeImageChannel()
331 assert(image->signature == MagickCoreSignature); in SerializeImageChannel()
332 if (image->debug != MagickFalse) in SerializeImageChannel()
333 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in SerializeImageChannel()
335 pack=SetImageMonochrome(image,exception) == MagickFalse ? 1UL : 8UL; in SerializeImageChannel()
336 padded_columns=((image->columns+pack-1)/pack)*pack; in SerializeImageChannel()
337 *length=(size_t) padded_columns*image->rows/pack; in SerializeImageChannel()
342 for (y=0; y < (ssize_t) image->rows; y++) in SerializeImageChannel()
344 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in SerializeImageChannel()
348 for (x=0; x < (ssize_t) image->columns; x++) in SerializeImageChannel()
350 *q++=ScaleQuantumToChar(ClampToQuantum(GetPixelLuma(image,p))); in SerializeImageChannel()
351 p+=GetPixelChannels(image); in SerializeImageChannel()
359 if (x < (ssize_t) image->columns) in SerializeImageChannel()
360 bit=(unsigned char) (GetPixelLuma(image,p) == TransparentAlpha ? in SerializeImageChannel()
368 p+=GetPixelChannels(image); in SerializeImageChannel()
371 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in SerializeImageChannel()
372 image->rows); in SerializeImageChannel()
382 Image *image,MemoryInfo **pixel_info,size_t *length,ExceptionInfo *exception) in SerializeImageIndexes() argument
399 assert(image != (Image *) NULL); in SerializeImageIndexes()
400 assert(image->signature == MagickCoreSignature); in SerializeImageIndexes()
401 if (image->debug != MagickFalse) in SerializeImageIndexes()
402 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in SerializeImageIndexes()
404 *length=(size_t) image->columns*image->rows; in SerializeImageIndexes()
409 for (y=0; y < (ssize_t) image->rows; y++) in SerializeImageIndexes()
411 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in SerializeImageIndexes()
414 for (x=0; x < (ssize_t) image->columns; x++) in SerializeImageIndexes()
416 *q++=(unsigned char) GetPixelIndex(image,p); in SerializeImageIndexes()
417 p+=GetPixelChannels(image); in SerializeImageIndexes()
419 if (image->previous == (Image *) NULL) in SerializeImageIndexes()
421 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in SerializeImageIndexes()
422 image->rows); in SerializeImageIndexes()
433 Image *image,const CompressionType compression,ExceptionInfo *exception) in WritePS3MaskImage() argument
463 assert(image != (Image *) NULL); in WritePS3MaskImage()
464 assert(image->signature == MagickCoreSignature); in WritePS3MaskImage()
465 if (image->debug != MagickFalse) in WritePS3MaskImage()
466 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WritePS3MaskImage()
467 assert(image->alpha_trait != UndefinedPixelTrait); in WritePS3MaskImage()
472 start=TellBlob(image); in WritePS3MaskImage()
478 (void) WriteBlobString(image,buffer); in WritePS3MaskImage()
479 stop=TellBlob(image); in WritePS3MaskImage()
492 " ByteStreamDecodeFilter\n",(double) image->columns,(double) in WritePS3MaskImage()
493 image->rows); in WritePS3MaskImage()
501 " ByteStreamDecodeFilter\n",(double) image->columns,(double) in WritePS3MaskImage()
502 image->rows); in WritePS3MaskImage()
509 " ByteStreamDecodeFilter\n",(double) image->columns,(double) in WritePS3MaskImage()
510 image->rows); in WritePS3MaskImage()
517 " ByteStreamDecodeFilter\n",(double) image->columns,(double) in WritePS3MaskImage()
518 image->rows); in WritePS3MaskImage()
525 " ByteStreamDecodeFilter\n",(double) image->columns,(double) in WritePS3MaskImage()
526 image->rows); in WritePS3MaskImage()
530 (void) WriteBlobString(image,buffer); in WritePS3MaskImage()
531 (void) WriteBlobString(image,"/ReusableStreamDecode filter\n"); in WritePS3MaskImage()
532 mask_image=SeparateImage(image,AlphaChannel,exception); in WritePS3MaskImage()
549 Ascii85Initialize(image); in WritePS3MaskImage()
552 Ascii85Encode(image,pixels[i]); in WritePS3MaskImage()
553 Ascii85Flush(image); in WritePS3MaskImage()
562 status=HuffmanEncodeImage(image_info,image,mask_image,exception); in WritePS3MaskImage()
564 status=Huffman2DEncodeImage(image_info,image,mask_image,exception); in WritePS3MaskImage()
574 status=LZWEncodeImage(image,length,pixels,exception); in WritePS3MaskImage()
585 status=PackbitsEncodeImage(image,length,pixels,exception); in WritePS3MaskImage()
596 status=ZLIBEncodeImage(image,length,pixels,exception); in WritePS3MaskImage()
602 (void) WriteBlobByte(image,'\n'); in WritePS3MaskImage()
603 length=(size_t) (TellBlob(image)-stop); in WritePS3MaskImage()
604 stop=TellBlob(image); in WritePS3MaskImage()
607 offset=SeekBlob(image,start,SEEK_SET); in WritePS3MaskImage()
613 (void) WriteBlobString(image,buffer); in WritePS3MaskImage()
614 offset=SeekBlob(image,stop,SEEK_SET); in WritePS3MaskImage()
617 (void) WriteBlobString(image,"%%EndData\n"); in WritePS3MaskImage()
618 (void) WriteBlobString(image, "/mask_stream exch def\n"); in WritePS3MaskImage()
622 static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image, in WritePS3Image() argument
889 assert(image != (Image *) NULL); in WritePS3Image()
890 assert(image->signature == MagickCoreSignature); in WritePS3Image()
891 if (image->debug != MagickFalse) in WritePS3Image()
892 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WritePS3Image()
895 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WritePS3Image()
898 compression=image->compression; in WritePS3Image()
906 if ((SetImageMonochrome(image,exception) == MagickFalse) || in WritePS3Image()
907 (image->alpha_trait != UndefinedPixelTrait)) in WritePS3Image()
917 image->filename); in WritePS3Image()
927 image->filename); in WritePS3Image()
937 imageListLength=GetImageListLength(image); in WritePS3Image()
945 resolution.x=image->resolution.x; in WritePS3Image()
946 resolution.y=image->resolution.y; in WritePS3Image()
963 if (image->units == PixelsPerCentimeterResolution) in WritePS3Image()
968 SetGeometry(image,&geometry); in WritePS3Image()
970 (double) image->columns,(double) image->rows); in WritePS3Image()
974 if ((image->page.width != 0) && (image->page.height != 0)) in WritePS3Image()
976 "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double) in WritePS3Image()
977 image->page.height,(double) image->page.x,(double) image->page.y); in WritePS3Image()
979 if ((image->gravity != UndefinedGravity) && in WritePS3Image()
990 (void) ParseGravityGeometry(image,page_geometry,&page_info,exception); in WritePS3Image()
991 if (image->gravity != UndefinedGravity) in WritePS3Image()
994 geometry.y=(ssize_t) (media_info.height+page_info.y-image->rows); in WritePS3Image()
1000 value=GetImageProperty(image,"label",exception); in WritePS3Image()
1014 (void) WriteBlobString(image,buffer); in WritePS3Image()
1017 (void) WriteBlobString(image,buffer); in WritePS3Image()
1019 image->filename); in WritePS3Image()
1020 (void) WriteBlobString(image,buffer); in WritePS3Image()
1025 (void) WriteBlobString(image,buffer); in WritePS3Image()
1031 (GetNextImageInList(image) != (Image *) NULL)) in WritePS3Image()
1033 (void) WriteBlobString(image,"%%BoundingBox: (atend)\n"); in WritePS3Image()
1034 (void) WriteBlobString(image,"%%HiResBoundingBox: (atend)\n"); in WritePS3Image()
1041 (void) WriteBlobString(image,buffer); in WritePS3Image()
1045 (void) WriteBlobString(image,buffer); in WritePS3Image()
1046 if (image->colorspace == CMYKColorspace) in WritePS3Image()
1047 (void) WriteBlobString(image, in WritePS3Image()
1050 if (SetImageGray(image,exception) != MagickFalse) in WritePS3Image()
1051 (void) WriteBlobString(image, in WritePS3Image()
1057 value=GetImageProperty(image,"label",exception); in WritePS3Image()
1059 (void) WriteBlobString(image, in WritePS3Image()
1061 (void) WriteBlobString(image,"%%LanguageLevel: 3\n"); in WritePS3Image()
1066 (void) WriteBlobString(image,"%%Pages: 1\n"); in WritePS3Image()
1069 (void) WriteBlobString(image,"%%Orientation: Portrait\n"); in WritePS3Image()
1070 (void) WriteBlobString(image,"%%PageOrder: Ascend\n"); in WritePS3Image()
1076 (void) WriteBlobString(image,buffer); in WritePS3Image()
1078 if (image->colorspace == CMYKColorspace) in WritePS3Image()
1079 (void) WriteBlobString(image, in WritePS3Image()
1081 (void) WriteBlobString(image,"%%EndComments\n"); in WritePS3Image()
1085 (void)WriteBlobString(image,"%%BeginProlog\n"); in WritePS3Image()
1088 (void) WriteBlobString(image,*q); in WritePS3Image()
1089 (void) WriteBlobByte(image,'\n'); in WritePS3Image()
1094 value=GetImageProperty(image,"label",exception); in WritePS3Image()
1097 (void) WriteBlobString(image,"\n %% Labels.\n /Helvetica " in WritePS3Image()
1101 (void) WriteBlobString(image, in WritePS3Image()
1105 (void) WriteBlobString(image,buffer); in WritePS3Image()
1113 (void) WriteBlobString(image,*q); in WritePS3Image()
1114 (void) WriteBlobByte(image,'\n'); in WritePS3Image()
1116 (void)WriteBlobString(image,"%%EndProlog\n"); in WritePS3Image()
1120 (void) WriteBlobString(image,buffer); in WritePS3Image()
1128 (void) WriteBlobString(image,buffer); in WritePS3Image()
1132 if (image->colorspace == CMYKColorspace) in WritePS3Image()
1133 (void) WriteBlobString(image, in WritePS3Image()
1136 if (SetImageGray(image,exception) != MagickFalse) in WritePS3Image()
1137 (void) WriteBlobString(image,"%%PageProcessColors: Black\n"); in WritePS3Image()
1152 value=GetImageProperty(image,"label",exception); in WritePS3Image()
1154 (void) WriteBlobString(image,"%%PageResources: font Helvetica\n"); in WritePS3Image()
1158 if (((image->channels & WriteMaskChannel) != 0) || in WritePS3Image()
1159 (LocaleNCompare("8BIM:",image->magick_filename,5) != 0)) in WritePS3Image()
1160 (void) WriteBlobString(image,"/ClipImage {} def\n"); in WritePS3Image()
1166 value=GetImageProperty(image,image->magick_filename,exception); in WritePS3Image()
1169 (void) WriteBlobString(image,value); in WritePS3Image()
1170 (void) WriteBlobByte(image,'\n'); in WritePS3Image()
1176 (void) WriteBlobString(image,"userdict begin\n"); in WritePS3Image()
1180 if ((image->alpha_trait != UndefinedPixelTrait) && in WritePS3Image()
1181 (WritePS3MaskImage(image_info,image,compression,exception) == MagickFalse)) in WritePS3Image()
1183 (void) CloseBlob(image); in WritePS3Image()
1189 start=TellBlob(image); in WritePS3Image()
1195 (void) WriteBlobString(image,buffer); in WritePS3Image()
1196 stop=TellBlob(image); in WritePS3Image()
1199 (void) WriteBlobString(image,"DisplayImage\n"); in WritePS3Image()
1205 (void) WriteBlobString(image,buffer); in WritePS3Image()
1210 value=GetImageProperty(image,"label",exception); in WritePS3Image()
1220 (void) WriteBlobByte(image,(unsigned char) labels[i][j]); in WritePS3Image()
1221 (void) WriteBlobByte(image,'\n'); in WritePS3Image()
1225 (void) WriteBlobString(image,"<~"); in WritePS3Image()
1226 Ascii85Initialize(image); in WritePS3Image()
1228 Ascii85Encode(image,(unsigned char) labels[i][j]); in WritePS3Image()
1229 Ascii85Flush(image); in WritePS3Image()
1238 if (((image->channels & WriteMaskChannel) != 0) && in WritePS3Image()
1239 (LocaleNCompare("8BIM:",image->magick_filename,5) == 0)) in WritePS3Image()
1240 (void) WriteBlobString(image,"true\n"); in WritePS3Image()
1242 (void) WriteBlobString(image,"false\n"); in WritePS3Image()
1246 (void) WriteBlobString(image, LocaleCompare(image_info->magick,"PS3") == 0 ? in WritePS3Image()
1252 (double) image->columns,(double) image->rows,image->colorspace == in WritePS3Image()
1254 (void) WriteBlobString(image,buffer); in WritePS3Image()
1258 (void) WriteBlobString(image,image->alpha_trait != UndefinedPixelTrait ? in WritePS3Image()
1264 (void) WriteBlobString(image,((option != (const char *) NULL) && in WritePS3Image()
1265 (SetImageMonochrome(image,exception) != MagickFalse)) ? in WritePS3Image()
1276 (image->colorspace != CMYKColorspace) && in WritePS3Image()
1277 ((SetImageGray(image,exception) != MagickFalse) || in WritePS3Image()
1278 (SetImageMonochrome(image,exception) != MagickFalse))) in WritePS3Image()
1283 (void) WriteBlobString(image,PS3_PseudoClass"\n"); in WritePS3Image()
1289 (void) WriteBlobString(image,PS3_NoCompression"\n"); in WritePS3Image()
1295 (void) WriteBlobString(image,PS3_FaxCompression"\n"); in WritePS3Image()
1300 (void) WriteBlobString(image,PS3_JPEGCompression"\n"); in WritePS3Image()
1305 (void) WriteBlobString(image,PS3_LZWCompression"\n"); in WritePS3Image()
1310 (void) WriteBlobString(image,PS3_RLECompression"\n"); in WritePS3Image()
1315 (void) WriteBlobString(image,PS3_ZipCompression"\n"); in WritePS3Image()
1322 (void) WriteBlobString(image,"0\n"); in WritePS3Image()
1327 SetImageMonochrome(image,exception) != MagickFalse ? 1 : 8); in WritePS3Image()
1328 (void) WriteBlobString(image,buffer); in WritePS3Image()
1333 status=InjectImageBlob(image_info,image,image,"jpeg",exception); in WritePS3Image()
1339 status=HuffmanEncodeImage(image_info,image,image,exception); in WritePS3Image()
1341 status=Huffman2DEncodeImage(image_info,image,image,exception); in WritePS3Image()
1345 status=SerializeImageChannel(image_info,image,&pixel_info,&length, in WritePS3Image()
1349 (void) CloseBlob(image); in WritePS3Image()
1358 Ascii85Initialize(image); in WritePS3Image()
1360 Ascii85Encode(image,pixels[i]); in WritePS3Image()
1361 Ascii85Flush(image); in WritePS3Image()
1367 status=LZWEncodeImage(image,length,pixels,exception); in WritePS3Image()
1372 status=PackbitsEncodeImage(image,length,pixels,exception); in WritePS3Image()
1377 status=ZLIBEncodeImage(image,length,pixels,exception); in WritePS3Image()
1385 if ((image->storage_class == DirectClass) || (image->colors > 256) || in WritePS3Image()
1391 (void) WriteBlobString(image,PS3_DirectClass"\n"); in WritePS3Image()
1397 (void) WriteBlobString(image,PS3_NoCompression"\n"); in WritePS3Image()
1402 (void) WriteBlobString(image,PS3_RLECompression"\n"); in WritePS3Image()
1407 (void) WriteBlobString(image,PS3_JPEGCompression"\n"); in WritePS3Image()
1412 (void) WriteBlobString(image,PS3_LZWCompression"\n"); in WritePS3Image()
1417 (void) WriteBlobString(image,PS3_ZipCompression"\n"); in WritePS3Image()
1425 status=InjectImageBlob(image_info,image,image,"jpeg",exception); in WritePS3Image()
1431 status=SerializeImage(image_info,image,&pixel_info,&length, in WritePS3Image()
1435 (void) CloseBlob(image); in WritePS3Image()
1444 Ascii85Initialize(image); in WritePS3Image()
1446 Ascii85Encode(image,pixels[i]); in WritePS3Image()
1447 Ascii85Flush(image); in WritePS3Image()
1453 status=PackbitsEncodeImage(image,length,pixels,exception); in WritePS3Image()
1458 status=LZWEncodeImage(image,length,pixels,exception); in WritePS3Image()
1463 status=ZLIBEncodeImage(image,length,pixels,exception); in WritePS3Image()
1475 (void) WriteBlobString(image,PS3_PseudoClass"\n"); in WritePS3Image()
1481 (void) WriteBlobString(image,PS3_NoCompression"\n"); in WritePS3Image()
1486 (void) WriteBlobString(image,PS3_RLECompression"\n"); in WritePS3Image()
1491 (void) WriteBlobString(image,PS3_LZWCompression"\n"); in WritePS3Image()
1496 (void) WriteBlobString(image,PS3_ZipCompression"\n"); in WritePS3Image()
1504 (double) image->colors); in WritePS3Image()
1505 (void) WriteBlobString(image,buffer); in WritePS3Image()
1512 for (i=0; i < (ssize_t) image->colors; i++) in WritePS3Image()
1514 pixel=ScaleQuantumToChar(image->colormap[i].red); in WritePS3Image()
1515 (void) WriteBlobByte(image,(unsigned char) pixel); in WritePS3Image()
1516 pixel=ScaleQuantumToChar(image->colormap[i].green); in WritePS3Image()
1517 (void) WriteBlobByte(image,(unsigned char) pixel); in WritePS3Image()
1518 pixel=ScaleQuantumToChar(image->colormap[i].blue); in WritePS3Image()
1519 (void) WriteBlobByte(image,(unsigned char) pixel); in WritePS3Image()
1524 Ascii85Initialize(image); in WritePS3Image()
1525 for (i=0; i < (ssize_t) image->colors; i++) in WritePS3Image()
1527 pixel=ScaleQuantumToChar(image->colormap[i].red); in WritePS3Image()
1528 Ascii85Encode(image,(unsigned char) pixel); in WritePS3Image()
1529 pixel=ScaleQuantumToChar(image->colormap[i].green); in WritePS3Image()
1530 Ascii85Encode(image,(unsigned char) pixel); in WritePS3Image()
1531 pixel=ScaleQuantumToChar(image->colormap[i].blue); in WritePS3Image()
1532 Ascii85Encode(image,(unsigned char) pixel); in WritePS3Image()
1534 Ascii85Flush(image); in WritePS3Image()
1536 status=SerializeImageIndexes(image_info,image,&pixel_info,&length, in WritePS3Image()
1540 (void) CloseBlob(image); in WritePS3Image()
1549 Ascii85Initialize(image); in WritePS3Image()
1551 Ascii85Encode(image,pixels[i]); in WritePS3Image()
1552 Ascii85Flush(image); in WritePS3Image()
1558 status=PackbitsEncodeImage(image,length,pixels,exception); in WritePS3Image()
1563 status=LZWEncodeImage(image,length,pixels,exception); in WritePS3Image()
1568 status=ZLIBEncodeImage(image,length,pixels,exception); in WritePS3Image()
1574 (void) WriteBlobByte(image,'\n'); in WritePS3Image()
1577 (void) CloseBlob(image); in WritePS3Image()
1583 length=(size_t) (TellBlob(image)-stop); in WritePS3Image()
1584 stop=TellBlob(image); in WritePS3Image()
1587 offset=SeekBlob(image,start,SEEK_SET); in WritePS3Image()
1593 (void) WriteBlobString(image,buffer); in WritePS3Image()
1594 offset=SeekBlob(image,stop,SEEK_SET); in WritePS3Image()
1595 (void) WriteBlobString(image,"%%EndData\n"); in WritePS3Image()
1600 (void) WriteBlobString(image,"end\n"); in WritePS3Image()
1601 (void) WriteBlobString(image,"%%PageTrailer\n"); in WritePS3Image()
1602 if (GetNextImageInList(image) == (Image *) NULL) in WritePS3Image()
1604 image=SyncNextImageInList(image); in WritePS3Image()
1605 status=SetImageProgress(image,SaveImagesTag,scene++,imageListLength); in WritePS3Image()
1609 (void) WriteBlobString(image,"%%Trailer\n"); in WritePS3Image()
1615 (void) WriteBlobString(image,buffer); in WritePS3Image()
1619 (void) WriteBlobString(image,buffer); in WritePS3Image()
1621 (void) WriteBlobString(image,"%%EOF\n"); in WritePS3Image()
1622 (void) CloseBlob(image); in WritePS3Image()