>K Z 1 N # ImageMagick Imagep


ImageMagick Image

NThe Image structure represents an ImageMagick image. It is initially allocatedLby AllocateImage() and deallocatedIby DestroyImage(). The functions2ReadImage(),4ReadImages(),4BlobToImage()Fand CreateImage() return a newFimage. Use CloneImage() to copyFan image. An image consists of a structure containing image attributesas well as the image pixels._

The image pixels are represented by the structure PixelPacketFand are cached in-memory, or on disk, depending on the cache thresholdFsetting. This cache is known as the "pixel cache". Pixels in the cacheKmay not be edited directly. They must first be made visible from the cache.HAfter an image has been read (and is therefore in the cache), the pixelsfare made visible and accessable by using the GetPixelCache()Imethod which allows importing a specified region of the image. The pixelslmay then be accessed via the pointer returned from GetPixelCache()Hor the pixels member (identical values). After theFpixels have been updated, they may be saved back to the cache in theirSoriginal positions via SyncPixelCache().I

In order to create an image with new contents, or to blindly overwrite]existing contents, the method  SetPixelCache()Jis used to reserve a pixel memory region corresponding to the pixel cache.GOnce the memory region has been updated, it may be written to the cache@via SyncPixelCache().M

When writing encoders and decoders for new image formats, it is convenientJto have a high-level interface available which supports converting betweenJexternal pixel representations and ImageMagick's own representation. PixelGcomponents (red, green, blue, opacity, RGB, or RGBA) may be transferred}from a user-supplied buffer into the image pixel buffer by using ReadPixelCache().FPixel components may be transferred from the image pixel buffer into a\user-supplied buffer by using WritePixelCache().HUse of this high-level interface helps protect image coders from changesHto ImageMagick's pixel representation and simplifies the implementation.G

The members of the Image structure are shown in the following table:
 Q1 MH; <+IEH0ERT7Q_GHF=J89*A[I;*)=$,C]G7*F7*K?$K;*I5$G=1?=&B9SI5!L7$J=$H?YGEHSA*J7$)5-F91AI*GK1JC*HC&M7*TCH=U*J;$J5-:]$KW$F9!G9*O5$A5!G9Jf=-?M];5**7*7?$r;!G?LFE+w7[7E$@E$>
Image Structure Members
MemberTypeDescription
background_colorPixelPacketImage background color
blurdoubleBlur factor to apply to the image when zooming. Defaultis 1.0 (no blur).
border_colorPixelPacketImage border color
chromaticityChromaticityInfoRed, green, blue, and white-point chromaticity values.
classClassTypeImage storage class. If DirectClassqthen the image packets contain valid RGB or CMYK colors. If PseudoClassIthen the image has a colormap referenced by pixel's index member. For C++-this member is known as "c_class"
color_profileProfileInfoICC color profile. Specifications are available fromTthe International Color Consortium for the format of ICC color profiles.
colormapPixelPacket *PseudoColor palette array.
colorsunsigned intThe desired number of colors. Used by QuantizeImage().
colorspaceColorspaceTypeImage pixel interpretation.If the colorspace is RGB theIpixels are red, green, blue. If matte is true, then red, green, blue, andLindex. If it is CMYK, the pixels are cyan, yellow, magenta, black. Otherwise&the colorspace is ignored.
columnsunsigned intImage width
commentschar *Image comments
compressionCompressionTypeImage compresion type. The default is the compression-type of the specified image file.
delayunsigned intTime in 1/100ths of a second (0 to 65535) which mustLexpire before displaying the next image in an animated sequence. This optionIis useful for regulating the animation of a sequence of GIF images withinNetscape.
depthunsigned intImage depth (8 or 16). QuantumLeap must be defined before#a depth of 16 is valid.
directorychar *Tile names from within an image montage. Only valid afterFcalling MontageImages() or;reading a MIFF file which contains a directory.
disposeunsigned intGIF disposal method. This option is used to control howGsuccessive frames are rendered (how the preceding frame is disposed of)*when creating a GIF animation.
fileFILE *Stdio stream to read image from or write image to. IfJset, ImageMagick will read from or write to the stream rather than openingza file. Used by ReadImage() and WriteImage().>The stream is closed when the operation completes.
filenamechar[MaxTextExtent]Image file name to read or write.
filesizelong intNumber of bytes of the encoded file.
filterFilterTypeFilter to use when resizing image. The reduction filterHemployed has a sigificant effect on the time required to resize an imageGand the resulting quality. The default filter is Lanczos which has beenLshown to produce high quality results when reducing most images.
fuzzintColors within this distance are considered equal. A numberLof algorithms search for a target color. By default the color must be exact.IUse this option to match colors that are close to the target color in RGBspace.
gammadoubleGamma level of the image. The same color image displayedFon two different workstations may look different due to differences inZthe display monitor. Use gamma correction to adjust for this color difference.
geometrychar *Preferred size of the image when encoding.
interlaceInterlaceTypeThe type of interlacing scheme (default NoInterlace).KThis option is used to specify the type of interlacing scheme for raw imageMformats such as RGB or YUV. NoInterlace means do not interlace, LineInterlaceXuses scanline interlacing, and PlaneInterlace uses plane interlacing. PartitionInterlaceJis like PlaneInterlace except the different planes are saved to individualOfiles (e.g. image.R, image.G, and image.B). Use LineInterlace or PlaneInterlaceBto create an interlaced GIF or progressive JPEG image.
iptc_profileProfileInfoIPTC profile. Specifications are available from the International?Press Telecommunications Council for IPTC profiles.
iterationsunsigned intNumber of iterations to loop an animation (e.g. Netscape loop extension) for.
labelchar *Image label
liststruct _Image *Undo image list (used only by 'display')
magickchar[MaxTextExtent]Image encoding format (e.g. "GIF").
magick_columnsunsigned intBase image width (before transformations)
magick_filenamechar[MaxTextExtent]Base image filename (before transformations)
magick_rowsunsigned intBase image height (before transformations)
magick_timelong intTime (as reported by POSIX time()) that image was allocatedby AllocateImage(). Used by DescribeImage()8to display the time spent reading the image.
matteunsigned intIf non-zero, then the index member of pixels)represents the alpha channel.
matte_colorPixelPacketImage matte (transparent) color
mean_error_per_pixelunsigned intThe mean error per pixel computed when an image is colorGreduced. This parameter is only valid if verbose is set to true and the*image has just been quantized.
montagechar *Tile size and offset within an image montage. Only validfor montage images.
nextstruct _Image *Next image frame in sequence
normalized_maximum_errordoubleThe normalized max error per pixel computed when an imageGis color reduced. This parameter is only valid if verbose is set:to true and the image has just been quantized.
normalized_mean_errordoubleThe normalized mean error per pixel computed when anFimage is color reduced. This parameter is only valid if verboseAis set to true and the image has just been quantized.
offsetintNumber of initial bytes to skip over when reading rawimage.
orphanunsigned intWhen set, CloneImage()Fclones only the current frame, creating an "orphan" frame.
pagechar *Equivalent size of Postscript page.
pipeintSet to True if image is read/written from/to aGPOSIX pipe. To read from (or write to) an open pipe, set this member to True,Fset the file member to a stdio stream representing“the pipe (obtained from popen()), and invoke ReadImage()/WriteImage().WThe pipe is automatically closed via pclose() when the operation completes.
pixelsPixelPacket *Image pixels retrieved via GetPixelCache()Yor initialized via SetPixelCache().
previousstruct _Image *Previous image frame in sequence.
rendering_intentRenderingIntentThe type of rendering intent.
rowsunsigned intImage height
sceneunsigned intImage frame scene number.
signaturechar *Image MD5 signature. Valid after SignatureImage()has been called.
taintedintSet to  non-zero (True) if the image pixels havebeen modified.
tile_infoRectangleInfoDescribes a tile within an image.  For example,Nif your images is 640x480 you may only want 320x256 with an offset of +128+64.PIt is used for raw formats such as RGB and CMYK as well as for TIFF.
total_colorsunsigned longThe number of colors in the image after QuantizeImage(),Hor QuantizeImages() if theverbose flag was set before the call. Calculated by GetNumberColors().
unitsResolutionTypeUnits of image resolution
x_resolutiondoubleHorizontal resolution of the image
y_resolutiondoubleVertical resolution of the image





–

Home Page9Image manipulation software that works like magic.