• Home
  • Raw
  • Download

Lines Matching refs:image

214 static inline Quantum ReadVIPSPixelNONE(Image *image,  in ReadVIPSPixelNONE()  argument
229 c=(unsigned char) ReadBlobByte(image); in ReadVIPSPixelNONE()
233 c=(unsigned char) ReadBlobShort(image); in ReadVIPSPixelNONE()
237 c=(unsigned char) ReadBlobLong(image); in ReadVIPSPixelNONE()
240 c=(unsigned char) ReadBlobFloat(image); in ReadVIPSPixelNONE()
243 c=(unsigned char) ReadBlobDouble(image); in ReadVIPSPixelNONE()
261 s=(unsigned short) ReadBlobShort(image); in ReadVIPSPixelNONE()
265 s=(unsigned short) ReadBlobLong(image); in ReadVIPSPixelNONE()
268 s=(unsigned short) ReadBlobFloat(image); in ReadVIPSPixelNONE()
271 s=(unsigned short) ReadBlobDouble(image); in ReadVIPSPixelNONE()
285 return(ScaleCharToQuantum((unsigned char) ReadBlobByte(image))); in ReadVIPSPixelNONE()
288 return(ScaleShortToQuantum(ReadBlobShort(image))); in ReadVIPSPixelNONE()
291 return(ScaleLongToQuantum(ReadBlobLong(image))); in ReadVIPSPixelNONE()
293 return((Quantum) ((float) QuantumRange*(ReadBlobFloat(image)/1.0))); in ReadVIPSPixelNONE()
296 image)/1.0))); in ReadVIPSPixelNONE()
305 static MagickBooleanType ReadVIPSPixelsNONE(Image *image, in ReadVIPSPixelsNONE() argument
321 for (y = 0; y < (ssize_t) image->rows; y++) in ReadVIPSPixelsNONE()
323 q=GetAuthenticPixels(image,0,y,image->columns,1,exception); in ReadVIPSPixelsNONE()
326 for (x=0; x < (ssize_t) image->columns; x++) in ReadVIPSPixelsNONE()
328 pixel=ReadVIPSPixelNONE(image,format,type); in ReadVIPSPixelsNONE()
329 SetPixelRed(image,pixel,q); in ReadVIPSPixelsNONE()
332 SetPixelGreen(image,pixel,q); in ReadVIPSPixelsNONE()
333 SetPixelBlue(image,pixel,q); in ReadVIPSPixelsNONE()
335 SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
339 SetPixelGreen(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
340 SetPixelBlue(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
343 if (image->colorspace == CMYKColorspace) in ReadVIPSPixelsNONE()
344 SetPixelIndex(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
346 SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
350 SetPixelIndex(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
351 SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q); in ReadVIPSPixelsNONE()
354 q+=GetPixelChannels(image); in ReadVIPSPixelsNONE()
356 if (SyncAuthenticPixels(image,exception) == MagickFalse) in ReadVIPSPixelsNONE()
370 *image; in ReadVIPSImage() local
399 image=AcquireImage(image_info,exception); in ReadVIPSImage()
400 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); in ReadVIPSImage()
403 image=DestroyImageList(image); in ReadVIPSImage()
406 marker=ReadBlobLSBLong(image); in ReadVIPSImage()
408 image->endian=LSBEndian; in ReadVIPSImage()
410 image->endian=MSBEndian; in ReadVIPSImage()
413 image->columns=(size_t) ReadBlobLong(image); in ReadVIPSImage()
414 image->rows=(size_t) ReadBlobLong(image); in ReadVIPSImage()
415 status=SetImageExtent(image,image->columns,image->rows,exception); in ReadVIPSImage()
417 return(DestroyImageList(image)); in ReadVIPSImage()
418 channels=ReadBlobLong(image); in ReadVIPSImage()
419 (void) ReadBlobLong(image); /* Legacy */ in ReadVIPSImage()
420 format=(VIPSBandFormat) ReadBlobLong(image); in ReadVIPSImage()
425 image->depth=8; in ReadVIPSImage()
429 image->depth=16; in ReadVIPSImage()
434 image->depth=32; in ReadVIPSImage()
437 image->depth=64; in ReadVIPSImage()
445 coding=(VIPSCoding) ReadBlobLong(image); in ReadVIPSImage()
446 type=(VIPSType) ReadBlobLong(image); in ReadVIPSImage()
450 SetImageColorspace(image,CMYKColorspace,exception); in ReadVIPSImage()
452 image->alpha_trait=BlendPixelTrait; in ReadVIPSImage()
456 SetImageColorspace(image,GRAYColorspace,exception); in ReadVIPSImage()
458 image->alpha_trait=BlendPixelTrait; in ReadVIPSImage()
462 SetImageColorspace(image,RGBColorspace,exception); in ReadVIPSImage()
464 image->alpha_trait=BlendPixelTrait; in ReadVIPSImage()
467 SetImageColorspace(image,sRGBColorspace,exception); in ReadVIPSImage()
469 image->alpha_trait=BlendPixelTrait; in ReadVIPSImage()
484 (void) SetImageBackgroundColor(image,exception); in ReadVIPSImage()
485 image->units=PixelsPerCentimeterResolution; in ReadVIPSImage()
486 image->resolution.x=ReadBlobFloat(image)*10; in ReadVIPSImage()
487 image->resolution.y=ReadBlobFloat(image)*10; in ReadVIPSImage()
491 (void) ReadBlobLongLong(image); in ReadVIPSImage()
492 (void) ReadBlobLongLong(image); in ReadVIPSImage()
493 (void) ReadBlobLongLong(image); in ReadVIPSImage()
495 return(image); in ReadVIPSImage()
502 status=ReadVIPSPixelsNONE(image,format,type,channels,exception); in ReadVIPSImage()
506 while ((n=ReadBlob(image,MagickPathExtent-1,(unsigned char *) buffer)) != 0) in ReadVIPSImage()
516 SetImageProperty(image,"vips:metadata",metadata,exception); in ReadVIPSImage()
519 (void) CloseBlob(image); in ReadVIPSImage()
522 return(image); in ReadVIPSImage()
610 static inline void WriteVIPSPixel(Image *image, const Quantum value) in WriteVIPSPixel() argument
612 if (image->depth == 16) in WriteVIPSPixel()
613 (void) WriteBlobShort(image,ScaleQuantumToShort(value)); in WriteVIPSPixel()
615 (void) WriteBlobByte(image,ScaleQuantumToChar(value)); in WriteVIPSPixel()
619 Image *image,ExceptionInfo *exception) in WriteVIPSImage() argument
641 assert(image != (Image *) NULL); in WriteVIPSImage()
642 assert(image->signature == MagickCoreSignature); in WriteVIPSImage()
643 if (image->debug != MagickFalse) in WriteVIPSImage()
644 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); in WriteVIPSImage()
646 status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); in WriteVIPSImage()
649 if (image->endian == LSBEndian) in WriteVIPSImage()
650 (void) WriteBlobLSBLong(image,VIPS_MAGIC_LSB); in WriteVIPSImage()
652 (void) WriteBlobLSBLong(image,VIPS_MAGIC_MSB); in WriteVIPSImage()
653 (void) WriteBlobLong(image,(unsigned int) image->columns); in WriteVIPSImage()
654 (void) WriteBlobLong(image,(unsigned int) image->rows); in WriteVIPSImage()
655 (void) SetImageStorageClass(image,DirectClass,exception); in WriteVIPSImage()
656 channels=image->alpha_trait != UndefinedPixelTrait ? 4 : 3; in WriteVIPSImage()
657 if (SetImageGray(image,exception) != MagickFalse) in WriteVIPSImage()
658 channels=image->alpha_trait != UndefinedPixelTrait ? 2 : 1; in WriteVIPSImage()
659 else if (image->colorspace == CMYKColorspace) in WriteVIPSImage()
660 channels=image->alpha_trait != UndefinedPixelTrait ? 5 : 4; in WriteVIPSImage()
661 (void) WriteBlobLong(image,channels); in WriteVIPSImage()
662 (void) WriteBlobLong(image,0); in WriteVIPSImage()
663 if (image->depth == 16) in WriteVIPSImage()
664 (void) WriteBlobLong(image,(unsigned int) VIPSBandFormatUSHORT); in WriteVIPSImage()
667 image->depth=8; in WriteVIPSImage()
668 (void) WriteBlobLong(image,(unsigned int) VIPSBandFormatUCHAR); in WriteVIPSImage()
670 (void) WriteBlobLong(image,VIPSCodingNONE); in WriteVIPSImage()
671 switch(image->colorspace) in WriteVIPSImage()
674 (void) WriteBlobLong(image,VIPSTypeCMYK); in WriteVIPSImage()
677 if (image->depth == 16) in WriteVIPSImage()
678 (void) WriteBlobLong(image, VIPSTypeGREY16); in WriteVIPSImage()
680 (void) WriteBlobLong(image, VIPSTypeB_W); in WriteVIPSImage()
683 (void) WriteBlobLong(image,VIPSTypeLAB); in WriteVIPSImage()
686 (void) WriteBlobLong(image,VIPSTypeLCH); in WriteVIPSImage()
689 if (image->depth == 16) in WriteVIPSImage()
690 (void) WriteBlobLong(image, VIPSTypeRGB16); in WriteVIPSImage()
692 (void) WriteBlobLong(image, VIPSTypeRGB); in WriteVIPSImage()
695 (void) WriteBlobLong(image,VIPSTypeXYZ); in WriteVIPSImage()
699 (void) SetImageColorspace(image,sRGBColorspace,exception); in WriteVIPSImage()
700 (void) WriteBlobLong(image,VIPSTypesRGB); in WriteVIPSImage()
703 if (image->units == PixelsPerCentimeterResolution) in WriteVIPSImage()
705 (void) WriteBlobFloat(image,(image->resolution.x / 10)); in WriteVIPSImage()
706 (void) WriteBlobFloat(image,(image->resolution.y / 10)); in WriteVIPSImage()
708 else if (image->units == PixelsPerInchResolution) in WriteVIPSImage()
710 (void) WriteBlobFloat(image,(image->resolution.x / 25.4)); in WriteVIPSImage()
711 (void) WriteBlobFloat(image,(image->resolution.y / 25.4)); in WriteVIPSImage()
715 (void) WriteBlobLong(image,0); in WriteVIPSImage()
716 (void) WriteBlobLong(image,0); in WriteVIPSImage()
722 (void) WriteBlobByte(image,0); in WriteVIPSImage()
723 for (y=0; y < (ssize_t) image->rows; y++) in WriteVIPSImage()
725 p=GetVirtualPixels(image,0,y,image->columns,1,exception); in WriteVIPSImage()
728 for (x=0; x < (ssize_t) image->columns; x++) in WriteVIPSImage()
730 WriteVIPSPixel(image,GetPixelRed(image,p)); in WriteVIPSImage()
732 WriteVIPSPixel(image,GetPixelAlpha(image,p)); in WriteVIPSImage()
735 WriteVIPSPixel(image,GetPixelGreen(image,p)); in WriteVIPSImage()
736 WriteVIPSPixel(image,GetPixelBlue(image,p)); in WriteVIPSImage()
739 if (image->colorspace == CMYKColorspace) in WriteVIPSImage()
740 WriteVIPSPixel(image,GetPixelIndex(image,p)); in WriteVIPSImage()
742 WriteVIPSPixel(image,GetPixelAlpha(image,p)); in WriteVIPSImage()
746 WriteVIPSPixel(image,GetPixelIndex(image,p)); in WriteVIPSImage()
747 WriteVIPSPixel(image,GetPixelAlpha(image,p)); in WriteVIPSImage()
750 p+=GetPixelChannels(image); in WriteVIPSImage()
753 metadata=GetImageProperty(image,"vips:metadata",exception); in WriteVIPSImage()
755 WriteBlobString(image,metadata); in WriteVIPSImage()
756 (void) CloseBlob(image); in WriteVIPSImage()