Lines Matching refs:image
236 *image; in ReadPALMImage() local
299 image=AcquireImage(image_info,exception); in ReadPALMImage()
300 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadPALMImage()
303 (void) DestroyImageList(image); in ReadPALMImage()
309 image->columns=ReadBlobMSBShort(image); in ReadPALMImage()
310 image->rows=ReadBlobMSBShort(image); in ReadPALMImage()
311 if (EOFBlob(image) != MagickFalse) in ReadPALMImage()
313 if ((image->columns == 0) || (image->rows == 0)) in ReadPALMImage()
315 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadPALMImage()
317 return(DestroyImageList(image)); in ReadPALMImage()
318 (void) SetImageBackgroundColor(image,exception); in ReadPALMImage()
319 bytes_per_row=ReadBlobMSBShort(image); in ReadPALMImage()
320 flags=ReadBlobMSBShort(image); in ReadPALMImage()
321 bits_per_pixel=(size_t) ReadBlobByte(image); in ReadPALMImage()
326 version=(size_t) ReadBlobByte(image); in ReadPALMImage()
329 nextDepthOffset=(size_t) ReadBlobMSBShort(image); in ReadPALMImage()
330 transparentIndex=(size_t) ReadBlobByte(image); in ReadPALMImage()
331 compressionType=(size_t) ReadBlobByte(image); in ReadPALMImage()
336 pad=ReadBlobMSBShort(image); in ReadPALMImage()
343 (AcquireImageColormap(image,one << bits_per_pixel,exception) == MagickFalse)) in ReadPALMImage()
345 GetPixelInfo(image,&transpix); in ReadPALMImage()
348 redbits=(size_t) ReadBlobByte(image); /* # of bits of red */ in ReadPALMImage()
350 greenbits=(size_t) ReadBlobByte(image); /* # of bits of green */ in ReadPALMImage()
352 bluebits=(size_t) ReadBlobByte(image); /* # of bits of blue */ in ReadPALMImage()
354 ReadBlobByte(image); /* reserved by Palm */ in ReadPALMImage()
355 ReadBlobByte(image); /* reserved by Palm */ in ReadPALMImage()
356 transpix.red=(double) (QuantumRange*ReadBlobByte(image)/31); in ReadPALMImage()
357 transpix.green=(double) (QuantumRange*ReadBlobByte(image)/63); in ReadPALMImage()
358 transpix.blue=(double) (QuantumRange*ReadBlobByte(image)/31); in ReadPALMImage()
367 count=(ssize_t) ReadBlobMSBShort(image); in ReadPALMImage()
370 ReadBlobByte(image); in ReadPALMImage()
371 index=ConstrainColormapIndex(image,255-i,exception); in ReadPALMImage()
372 image->colormap[index].red=(MagickRealType) in ReadPALMImage()
373 ScaleCharToQuantum((unsigned char) ReadBlobByte(image)); in ReadPALMImage()
374 image->colormap[index].green=(MagickRealType) in ReadPALMImage()
375 ScaleCharToQuantum((unsigned char) ReadBlobByte(image)); in ReadPALMImage()
376 image->colormap[index].blue=(MagickRealType) in ReadPALMImage()
377 ScaleCharToQuantum((unsigned char) ReadBlobByte(image)); in ReadPALMImage()
383 index=ConstrainColormapIndex(image,255-i,exception); in ReadPALMImage()
384 image->colormap[index].red=(MagickRealType) in ReadPALMImage()
386 image->colormap[index].green=(MagickRealType) in ReadPALMImage()
388 image->colormap[index].blue=(MagickRealType) in ReadPALMImage()
393 size=ReadBlobMSBShort(image); in ReadPALMImage()
395 image->storage_class=DirectClass; in ReadPALMImage()
398 image->storage_class=PseudoClass; in ReadPALMImage()
399 image->depth=8; in ReadPALMImage()
403 (void) CloseBlob(image); in ReadPALMImage()
404 return(image); in ReadPALMImage()
406 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadPALMImage()
408 return(DestroyImageList(image)); in ReadPALMImage()
409 extent=MagickMax(bytes_per_row,2*image->columns); in ReadPALMImage()
418 2*image->columns),sizeof(*last_row)); in ReadPALMImage()
424 (void) memset(last_row,0,MagickMax(bytes_per_row,2*image->columns)* in ReadPALMImage()
428 for (y=0; y < (ssize_t) image->rows; y++) in ReadPALMImage()
433 image->compression=NoCompression; in ReadPALMImage()
434 count=ReadBlob(image,bytes_per_row,one_row); in ReadPALMImage()
443 image->compression=RLECompression; in ReadPALMImage()
446 count=(ssize_t) ReadBlobByte(image); in ReadPALMImage()
450 byte=(size_t) ReadBlobByte(image); in ReadPALMImage()
463 image->compression=FaxCompression; in ReadPALMImage()
466 count=(ssize_t) ReadBlobByte(image); in ReadPALMImage()
473 one_row[i+bit]=(unsigned char) ReadBlobByte(image); in ReadPALMImage()
482 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); in ReadPALMImage()
487 if (image->columns > (2*bytes_per_row)) in ReadPALMImage()
494 for (x=0; x < (ssize_t) image->columns; x++) in ReadPALMImage()
498 SetPixelRed(image,(Quantum) ((QuantumRange*((color16 >> 11) & in ReadPALMImage()
500 SetPixelGreen(image,(Quantum) ((QuantumRange*((color16 >> 5) & in ReadPALMImage()
502 SetPixelBlue(image,(Quantum) ((QuantumRange*((color16 >> 0) & in ReadPALMImage()
504 SetPixelAlpha(image,OpaqueAlpha,q); in ReadPALMImage()
505 q+=GetPixelChannels(image); in ReadPALMImage()
511 for (x=0; x < (ssize_t) image->columns; x++) in ReadPALMImage()
521 SetPixelIndex(image,index,q); in ReadPALMImage()
522 SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q); in ReadPALMImage()
530 q+=GetPixelChannels(image); in ReadPALMImage()
532 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadPALMImage()
535 if (image->previous == (Image *) NULL) in ReadPALMImage()
537 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, in ReadPALMImage()
538 image->rows); in ReadPALMImage()
545 ssize_t index=ConstrainColormapIndex(image,(ssize_t) (mask- in ReadPALMImage()
548 transpix=image->colormap[index]; in ReadPALMImage()
549 (void) TransparentPaintImage(image,&transpix,(Quantum) TransparentAlpha, in ReadPALMImage()
555 if (EOFBlob(image) != MagickFalse) in ReadPALMImage()
558 image->filename); in ReadPALMImage()
565 if (image->scene >= (image_info->scene+image_info->number_scenes-1)) in ReadPALMImage()
573 if (totalOffset >= (MagickOffsetType) GetBlobSize(image)) in ReadPALMImage()
576 seekNextDepth=SeekBlob(image,totalOffset,SEEK_SET); in ReadPALMImage()
582 AcquireNextImage(image_info,image,exception); in ReadPALMImage()
583 if (GetNextImageInList(image) == (Image *) NULL) in ReadPALMImage()
588 image=SyncNextImageInList(image); in ReadPALMImage()
589 status=SetImageProgress(image,LoadImagesTag,TellBlob(image), in ReadPALMImage()
590 GetBlobSize(image)); in ReadPALMImage()
595 (void) CloseBlob(image); in ReadPALMImage()
597 return(DestroyImageList(image)); in ReadPALMImage()
598 return(GetFirstImageInList(image)); in ReadPALMImage()
689 Image *image,ExceptionInfo *exception) in WritePALMImage() argument
751 assert(image != (Image *) NULL); in WritePALMImage()
752 assert(image->signature == MagickCoreSignature); in WritePALMImage()
753 if (image->debug != MagickFalse) in WritePALMImage()
754 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WritePALMImage()
757 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WritePALMImage()
771 imageListLength=GetImageListLength(image); in WritePALMImage()
774 (void) TransformImageColorspace(image,sRGBColorspace,exception); in WritePALMImage()
775 count=GetNumberColors(image,NULL,exception); in WritePALMImage()
781 (void) TransformImageColorspace(image,image->colorspace,exception); in WritePALMImage()
784 (void) TransformImageColorspace(image,GRAYColorspace,exception); in WritePALMImage()
785 (void) SetImageType(image,PaletteType,exception); in WritePALMImage()
786 (void) SortColormapByIntensity(image,exception); in WritePALMImage()
788 if ((image->storage_class == PseudoClass) && (image->colors > 256)) in WritePALMImage()
789 (void) SetImageStorageClass(image,DirectClass,exception); in WritePALMImage()
790 if (image->storage_class == PseudoClass) in WritePALMImage()
794 (void) WriteBlobMSBShort(image,(unsigned short) image->columns); /* width */ in WritePALMImage()
795 (void) WriteBlobMSBShort(image,(unsigned short) image->rows); /* height */ in WritePALMImage()
796 bytes_per_row=((image->columns+(16/bits_per_pixel-1))/(16/ in WritePALMImage()
798 (void) WriteBlobMSBShort(image,(unsigned short) bytes_per_row); in WritePALMImage()
802 (void) WriteBlobMSBShort(image, flags); in WritePALMImage()
803 (void) WriteBlobByte(image,(unsigned char) bits_per_pixel); in WritePALMImage()
809 (void) WriteBlobByte(image,version); in WritePALMImage()
810 (void) WriteBlobMSBShort(image,0); /* nextDepthOffset */ in WritePALMImage()
811 (void) WriteBlobByte(image,(unsigned char) transparentIndex); in WritePALMImage()
813 (void) WriteBlobByte(image,PALM_COMPRESSION_RLE); in WritePALMImage()
816 (void) WriteBlobByte(image,PALM_COMPRESSION_SCANLINE); in WritePALMImage()
818 (void) WriteBlobByte(image,PALM_COMPRESSION_NONE); in WritePALMImage()
819 (void) WriteBlobMSBShort(image,0); /* reserved */ in WritePALMImage()
823 (void) WriteBlobByte(image,5); /* # of bits of red */ in WritePALMImage()
824 (void) WriteBlobByte(image,6); /* # of bits of green */ in WritePALMImage()
825 (void) WriteBlobByte(image,5); /* # of bits of blue */ in WritePALMImage()
826 (void) WriteBlobByte(image,0); /* reserved by Palm */ in WritePALMImage()
827 (void) WriteBlobMSBLong(image,0); /* no transparent color, YET */ in WritePALMImage()
834 quantize_info->dither_method=IdentifyPaletteImage(image,exception) in WritePALMImage()
836 quantize_info->number_colors=image->colors; in WritePALMImage()
837 (void) QuantizeImage(quantize_info,image,exception); in WritePALMImage()
838 (void) WriteBlobMSBShort(image,(unsigned short) image->colors); in WritePALMImage()
839 for (count = 0; count < image->colors; count++) in WritePALMImage()
841 (void) WriteBlobByte(image,(unsigned char) count); in WritePALMImage()
842 (void) WriteBlobByte(image,ScaleQuantumToChar(ClampToQuantum( in WritePALMImage()
843 image->colormap[count].red))); in WritePALMImage()
844 (void) WriteBlobByte(image,ScaleQuantumToChar(ClampToQuantum( in WritePALMImage()
845 image->colormap[count].green))); in WritePALMImage()
846 (void) WriteBlobByte(image,ScaleQuantumToChar(ClampToQuantum( in WritePALMImage()
847 image->colormap[count].blue))); in WritePALMImage()
860 (void) RemapImage(quantize_info,image,affinity_image,exception); in WritePALMImage()
861 for (y=0; y < (ssize_t) image->rows; y++) in WritePALMImage()
863 q=GetAuthenticPixels(image,0,y,image->columns,1,exception); in WritePALMImage()
866 for (x=0; x < (ssize_t) image->columns; x++) in WritePALMImage()
868 SetPixelIndex(image,(Quantum) FindColor(&image->colormap[(ssize_t) in WritePALMImage()
869 GetPixelIndex(image,q)]),q); in WritePALMImage()
870 q+=GetPixelChannels(image); in WritePALMImage()
877 (void) WriteBlobMSBShort(image,0); /* fill in size later */ in WritePALMImage()
898 for (y=0; y < (ssize_t) image->rows; y++) in WritePALMImage()
902 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WritePALMImage()
907 for (x=0; x < (ssize_t) image->columns; x++) in WritePALMImage()
909 color16=(unsigned short) ((((31*(ssize_t) GetPixelRed(image,p))/ in WritePALMImage()
911 GetPixelGreen(image,p))/(ssize_t) QuantumRange) << 5) | in WritePALMImage()
912 ((31*(ssize_t) GetPixelBlue(image,p))/(ssize_t) QuantumRange)); in WritePALMImage()
913 if (GetPixelAlpha(image,p) == (Quantum) TransparentAlpha) in WritePALMImage()
915 transpix.red=(MagickRealType) GetPixelRed(image,p); in WritePALMImage()
916 transpix.green=(MagickRealType) GetPixelGreen(image,p); in WritePALMImage()
917 transpix.blue=(MagickRealType) GetPixelBlue(image,p); in WritePALMImage()
918 transpix.alpha=(MagickRealType) GetPixelAlpha(image,p); in WritePALMImage()
923 p+=GetPixelChannels(image); in WritePALMImage()
930 for (x=0; x < (ssize_t) image->columns; x++) in WritePALMImage()
933 color=(unsigned char) ((ssize_t) GetPixelIndex(image,p)); in WritePALMImage()
935 color=(unsigned char) (GetPixelIndex(image,p)* in WritePALMImage()
936 ((one << bits_per_pixel)-1)/MagickMax(1*image->colors-1,1)); in WritePALMImage()
946 p+=GetPixelChannels(image); in WritePALMImage()
948 if ((image->columns % (8/bits_per_pixel)) != 0) in WritePALMImage()
961 (void) WriteBlobByte(image,(unsigned char) count); in WritePALMImage()
962 (void) WriteBlobByte(image,(unsigned char) byte); in WritePALMImage()
983 (void) WriteBlobByte(image, byte); in WritePALMImage()
984 (void) WriteBlob(image,tptr-tmpbuf,(unsigned char *) tmpbuf); in WritePALMImage()
989 (void) WriteBlob(image,bytes_per_row,one_row); in WritePALMImage()
993 offset=SeekBlob(image,currentOffset+6,SEEK_SET); in WritePALMImage()
994 (void) WriteBlobMSBShort(image,flags); in WritePALMImage()
995 offset=SeekBlob(image,currentOffset+12,SEEK_SET); in WritePALMImage()
996 (void) WriteBlobByte(image,(unsigned char) transparentIndex); /* trans index */ in WritePALMImage()
1000 offset=SeekBlob(image,currentOffset+20,SEEK_SET); in WritePALMImage()
1001 (void) WriteBlobByte(image,0); /* reserved by Palm */ in WritePALMImage()
1002 (void) WriteBlobByte(image,(unsigned char) ((31*transpix.red)/ in WritePALMImage()
1004 (void) WriteBlobByte(image,(unsigned char) ((63*transpix.green)/ in WritePALMImage()
1006 (void) WriteBlobByte(image,(unsigned char) ((31*transpix.blue)/ in WritePALMImage()
1011 offset=SeekBlob(image,currentOffset+offset,SEEK_SET); in WritePALMImage()
1012 (void) WriteBlobMSBShort(image,(unsigned short) (GetBlobSize(image)- in WritePALMImage()
1019 if (GetNextImageInList(image) == (Image *) NULL) in WritePALMImage()
1022 for (cc=(GetBlobSize(image)) % 4; cc > 0; cc--) in WritePALMImage()
1023 (void) WriteBlobByte(image,0); in WritePALMImage()
1025 offset=SeekBlob(image,currentOffset+10,SEEK_SET); in WritePALMImage()
1026 nextDepthOffset=(size_t) ((GetBlobSize(image)-currentOffset)/4); in WritePALMImage()
1027 (void) WriteBlobMSBShort(image,(unsigned short) nextDepthOffset); in WritePALMImage()
1028 currentOffset=(MagickOffsetType) GetBlobSize(image); in WritePALMImage()
1029 offset=SeekBlob(image,currentOffset,SEEK_SET); in WritePALMImage()
1030 image=SyncNextImageInList(image); in WritePALMImage()
1031 status=SetImageProgress(image,SaveImagesTag,scene++,imageListLength); in WritePALMImage()
1036 (void) CloseBlob(image); in WritePALMImage()