Lines Matching refs:image

108     *image;  in ReadGRAYImage()  local
142 image=AcquireImage(image_info,exception); in ReadGRAYImage()
143 if ((image->columns == 0) || (image->rows == 0)) in ReadGRAYImage()
145 image->colorspace=GRAYColorspace; in ReadGRAYImage()
148 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadGRAYImage()
151 image=DestroyImageList(image); in ReadGRAYImage()
154 if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse) in ReadGRAYImage()
156 image->filename); in ReadGRAYImage()
161 canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse, in ReadGRAYImage()
177 image->alpha_trait=BlendPixelTrait; in ReadGRAYImage()
182 while (image->scene < image_info->scene) in ReadGRAYImage()
187 image->scene++; in ReadGRAYImage()
189 for (y=0; y < (ssize_t) image->rows; y++) in ReadGRAYImage()
191 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
207 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadGRAYImage()
209 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadGRAYImage()
223 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
226 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
241 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
252 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
253 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
257 q=QueueAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
258 image->columns,1,exception); in ReadGRAYImage()
261 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
263 SetPixelRed(image,GetPixelRed(canvas_image,p),q); in ReadGRAYImage()
264 SetPixelGreen(image,GetPixelGreen(canvas_image,p),q); in ReadGRAYImage()
265 SetPixelBlue(image,GetPixelBlue(canvas_image,p),q); in ReadGRAYImage()
266 SetPixelAlpha(image,OpaqueAlpha,q); in ReadGRAYImage()
267 if (image->alpha_trait != UndefinedPixelTrait) in ReadGRAYImage()
268 SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q); in ReadGRAYImage()
270 q+=GetPixelChannels(image); in ReadGRAYImage()
272 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
275 if (image->previous == (Image *) NULL) in ReadGRAYImage()
277 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, in ReadGRAYImage()
278 image->rows); in ReadGRAYImage()
282 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
302 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
305 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
307 for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++) in ReadGRAYImage()
322 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
334 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
335 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
339 q=GetAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
340 image->columns,1,exception); in ReadGRAYImage()
343 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
349 SetPixelGray(image,GetPixelGray(canvas_image,p),q); in ReadGRAYImage()
354 SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q); in ReadGRAYImage()
361 q+=GetPixelChannels(image); in ReadGRAYImage()
363 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
366 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
369 if (image->previous == (Image *) NULL) in ReadGRAYImage()
371 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, in ReadGRAYImage()
372 image->rows); in ReadGRAYImage()
387 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
390 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
405 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
416 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
417 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
421 q=GetAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
422 image->columns,1,exception); in ReadGRAYImage()
425 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
427 SetPixelGray(image,GetPixelGray(canvas_image,p),q); in ReadGRAYImage()
429 q+=GetPixelChannels(image); in ReadGRAYImage()
431 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
434 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
437 if (image->previous == (Image *) NULL) in ReadGRAYImage()
439 status=SetImageProgress(image,LoadImageTag,1,6); in ReadGRAYImage()
443 if (image->alpha_trait != UndefinedPixelTrait) in ReadGRAYImage()
445 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
460 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
471 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
472 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
477 q=GetAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
478 image->columns,1,exception); in ReadGRAYImage()
481 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
483 SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q); in ReadGRAYImage()
485 q+=GetPixelChannels(image); in ReadGRAYImage()
487 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
490 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
493 if (image->previous == (Image *) NULL) in ReadGRAYImage()
495 status=SetImageProgress(image,LoadImageTag,5,6); in ReadGRAYImage()
500 if (image->previous == (Image *) NULL) in ReadGRAYImage()
502 status=SetImageProgress(image,LoadImageTag,6,6); in ReadGRAYImage()
513 AppendImageFormat("G",image->filename); in ReadGRAYImage()
514 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadGRAYImage()
517 if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse) in ReadGRAYImage()
521 image->filename); in ReadGRAYImage()
527 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
529 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
537 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
539 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
554 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
565 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
566 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
570 q=GetAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
571 image->columns,1,exception); in ReadGRAYImage()
574 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
576 SetPixelRed(image,GetPixelRed(canvas_image,p),q); in ReadGRAYImage()
578 q+=GetPixelChannels(image); in ReadGRAYImage()
580 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
583 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
586 if (image->previous == (Image *) NULL) in ReadGRAYImage()
588 status=SetImageProgress(image,LoadImageTag,1,5); in ReadGRAYImage()
592 (void) CloseBlob(image); in ReadGRAYImage()
593 if (image->alpha_trait != UndefinedPixelTrait) in ReadGRAYImage()
595 (void) CloseBlob(image); in ReadGRAYImage()
596 AppendImageFormat("A",image->filename); in ReadGRAYImage()
597 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadGRAYImage()
603 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
605 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
613 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
615 for (y=0; y < (ssize_t) image->extract_info.height; y++) in ReadGRAYImage()
630 "UnexpectedEndOfFile",image->filename); in ReadGRAYImage()
641 if (((y-image->extract_info.y) >= 0) && in ReadGRAYImage()
642 ((y-image->extract_info.y) < (ssize_t) image->rows)) in ReadGRAYImage()
646 q=GetAuthenticPixels(image,0,y-image->extract_info.y, in ReadGRAYImage()
647 image->columns,1,exception); in ReadGRAYImage()
650 for (x=0; x < (ssize_t) image->columns; x++) in ReadGRAYImage()
652 SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q); in ReadGRAYImage()
654 q+=GetPixelChannels(image); in ReadGRAYImage()
656 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadGRAYImage()
659 pixels=(const unsigned char *) ReadBlobStream(image,length, in ReadGRAYImage()
662 if (image->previous == (Image *) NULL) in ReadGRAYImage()
664 status=SetImageProgress(image,LoadImageTag,4,5); in ReadGRAYImage()
669 (void) CloseBlob(image); in ReadGRAYImage()
670 if (image->previous == (Image *) NULL) in ReadGRAYImage()
672 status=SetImageProgress(image,LoadImageTag,5,5); in ReadGRAYImage()
681 SetQuantumImageType(image,quantum_type); in ReadGRAYImage()
686 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadGRAYImage()
693 AcquireNextImage(image_info,image,exception); in ReadGRAYImage()
694 if (GetNextImageInList(image) == (Image *) NULL) in ReadGRAYImage()
699 image=SyncNextImageInList(image); in ReadGRAYImage()
700 status=SetImageProgress(image,LoadImagesTag,TellBlob(image), in ReadGRAYImage()
701 GetBlobSize(image)); in ReadGRAYImage()
709 (void) CloseBlob(image); in ReadGRAYImage()
711 return(DestroyImageList(image)); in ReadGRAYImage()
712 return(GetFirstImageInList(image)); in ReadGRAYImage()
812 Image *image,ExceptionInfo *exception) in WriteGRAYImage() argument
842 assert(image != (Image *) NULL); in WriteGRAYImage()
843 assert(image->signature == MagickCoreSignature); in WriteGRAYImage()
844 if (image->debug != MagickFalse) in WriteGRAYImage()
845 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WriteGRAYImage()
851 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WriteGRAYImage()
859 imageListLength=GetImageListLength(image); in WriteGRAYImage()
865 (void) TransformImageColorspace(image,GRAYColorspace,exception); in WriteGRAYImage()
867 (image->alpha_trait == UndefinedPixelTrait)) in WriteGRAYImage()
868 (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); in WriteGRAYImage()
869 quantum_info=AcquireQuantumInfo(image_info,image); in WriteGRAYImage()
881 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
886 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
889 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
891 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
894 if (image->previous == (Image *) NULL) in WriteGRAYImage()
896 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in WriteGRAYImage()
897 image->rows); in WriteGRAYImage()
909 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
914 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
917 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
919 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
924 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
926 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
930 if (image->previous == (Image *) NULL) in WriteGRAYImage()
932 status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, in WriteGRAYImage()
933 image->rows); in WriteGRAYImage()
945 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
950 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
953 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
955 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
959 if (image->previous == (Image *) NULL) in WriteGRAYImage()
961 status=SetImageProgress(image,SaveImageTag,1,6); in WriteGRAYImage()
967 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
972 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
975 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
977 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
981 if (image->previous == (Image *) NULL) in WriteGRAYImage()
983 status=SetImageProgress(image,SaveImageTag,5,6); in WriteGRAYImage()
989 (void) CopyMagickString(image->filename,image_info->filename, in WriteGRAYImage()
991 if (image->previous == (Image *) NULL) in WriteGRAYImage()
993 status=SetImageProgress(image,SaveImageTag,6,6); in WriteGRAYImage()
1004 AppendImageFormat("G",image->filename); in WriteGRAYImage()
1005 status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode : in WriteGRAYImage()
1009 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
1014 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
1017 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
1019 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
1023 if (image->previous == (Image *) NULL) in WriteGRAYImage()
1025 status=SetImageProgress(image,SaveImageTag,1,6); in WriteGRAYImage()
1029 (void) CloseBlob(image); in WriteGRAYImage()
1032 (void) CloseBlob(image); in WriteGRAYImage()
1033 AppendImageFormat("A",image->filename); in WriteGRAYImage()
1034 status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode : in WriteGRAYImage()
1038 for (y=0; y < (ssize_t) image->rows; y++) in WriteGRAYImage()
1043 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteGRAYImage()
1046 length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info, in WriteGRAYImage()
1048 count=WriteBlob(image,length,pixels); in WriteGRAYImage()
1052 if (image->previous == (Image *) NULL) in WriteGRAYImage()
1054 status=SetImageProgress(image,SaveImageTag,5,6); in WriteGRAYImage()
1059 (void) CloseBlob(image); in WriteGRAYImage()
1060 (void) CopyMagickString(image->filename,image_info->filename, in WriteGRAYImage()
1062 if (image->previous == (Image *) NULL) in WriteGRAYImage()
1064 status=SetImageProgress(image,SaveImageTag,6,6); in WriteGRAYImage()
1072 if (GetNextImageInList(image) == (Image *) NULL) in WriteGRAYImage()
1074 image=SyncNextImageInList(image); in WriteGRAYImage()
1075 status=SetImageProgress(image,SaveImagesTag,scene++,imageListLength); in WriteGRAYImage()
1079 (void) CloseBlob(image); in WriteGRAYImage()