www/api/attribute.html
Select API Method
GetImageConvexHull() returns the convex hull points of an image canvas.
The format of the GetImageConvexHull method is:
PointInfo \*GetImageConvexHull(const Image \*image, size\_t number\_vertices,ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. number_verticesthe number of vertices in the convex hull. exceptionreturn any errors or warnings in this structure.
GetImageDepth() returns the depth of a particular image channel.
The format of the GetImageDepth method is:
size\_t GetImageDepth(const Image \*image,ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. exceptionreturn any errors or warnings in this structure.
GetImageMinimumBoundingBox() returns the points that form the minimum bounding box around the image foreground objects with the "Rotating Calipers" algorithm. The method also returns these properties:
minimum-bounding-box:height, and minimum-bounding-box:angle.
The format of the GetImageMinimumBoundingBox method is:
PointInfo \*GetImageMinimumBoundingBox(Image \*image, size\_t number\_vertices,ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. number_verticesthe number of vertices in the bounding box. exceptionreturn any errors or warnings in this structure.
GetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32.
The format of the GetImageQuantumDepth method is:
size\_t GetImageQuantumDepth(const Image \*image, const MagickBooleanType constrain)
A description of each parameter follows:
imagethe image. constrainA value other than MagickFalse, constrains the depth to a maximum of MAGICKCORE_QUANTUM_DEPTH.
GetImageType() returns the type of image:
Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte
The format of the GetImageType method is:
ImageType GetImageType(const Image \*image)
A description of each parameter follows:
imagethe image.
IdentifyImageGray() returns grayscale if all the pixels in the image have the same red, green, and blue intensities, and bi-level if the intensity is either 0 or QuantumRange. Otherwise undefined is returned.
The format of the IdentifyImageGray method is:
ImageType IdentifyImageGray(const Image \*image,ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. exceptionreturn any errors or warnings in this structure.
IdentifyImageMonochrome() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or QuantumRange.
The format of the IdentifyImageMonochrome method is:
MagickBooleanType IdentifyImageMonochrome(const Image \*image, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. exceptionreturn any errors or warnings in this structure.
IdentifyImageType() returns the potential type of image:
Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte
To ensure the image type matches its potential, use SetImageType():
(void) SetImageType(image,IdentifyImageType(image,exception),exception);
The format of the IdentifyImageType method is:
ImageType IdentifyImageType(const Image \*image,ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. exceptionreturn any errors or warnings in this structure.
IsImageGray() returns MagickTrue if the type of the image is grayscale or bi-level.
The format of the IsImageGray method is:
MagickBooleanType IsImageGray(const Image \*image)
A description of each parameter follows:
imagethe image.
IsImageMonochrome() returns MagickTrue if type of the image is bi-level.
The format of the IsImageMonochrome method is:
MagickBooleanType IsImageMonochrome(const Image \*image)
A description of each parameter follows:
imagethe image.
IsImageOpaque() returns MagickTrue if none of the pixels in the image have an alpha value other than OpaqueAlpha (QuantumRange).
Will return true immediately is alpha channel is not available.
The format of the IsImageOpaque method is:
MagickBooleanType IsImageOpaque(const Image \*image, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. exceptionreturn any errors or warnings in this structure.
SetImageDepth() sets the depth of the image.
The format of the SetImageDepth method is:
MagickBooleanType SetImageDepth(Image \*image,const size\_t depth, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. channelthe channel. depththe image depth. exceptionreturn any errors or warnings in this structure.
SetImageType() sets the type of image. Choose from these types:
Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte OptimizeType
The format of the SetImageType method is:
MagickBooleanType SetImageType(Image \*image,const ImageType type, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. typeImage type. exceptionreturn any errors or warnings in this structure.