ImageMagick Logo ImageMagick Sprite
Unix
Mac OS X
iOS
Windows
Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Links

Module attribute Methods

GetImageDepth

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:

image

the image.

exception

return any errors or warnings in this structure.

GetImageQuantumDepth

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:

image

the image.

constrain

A value other than MagickFalse, constrains the depth to a maximum of MAGICKCORE_QUANTUM_DEPTH.

GetImageType

GetImageType() 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,GetImageType(image));

The format of the GetImageType method is:

  ImageType GetImageType(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image

the image.

exception

return any errors or warnings in this structure.

IsImageGray

IsImageGray() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities.

The format of the IsImageGray method is:

  MagickBooleanType IsImageGray(const Image *image,
    ExceptionInfo *exception)

A description of each parameter follows:

image

the image.

exception

return any errors or warnings in this structure.

IsImageMonochrome

IsImageMonochrome() 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 IsImageMonochrome method is:

  MagickBooleanType IsImageMonochrome(const Image *image,
    ExceptionInfo *exception)

A description of each parameter follows:

image

the image.

exception

return any errors or warnings in this structure.

IsImageOpaque

IsImageOpaque() returns MagickTrue if none of the pixels in the image have an opacity value other than opaque (0).

The format of the IsImageOpaque method is:

  MagickBooleanType IsImageOpaque(const Image *image,
    ExceptionInfo *exception)

A description of each parameter follows:

image

the image.

exception

return any errors or warnings in this structure.

SetImageDepth

SetImageDepth() sets the depth of the image.

The format of the SetImageDepth method is:

  MagickBooleanType SetImageDepth(Image *image,const size_t depth)
  MagickBooleanType SetImageDepth(Image *image,
    const ChannelType channel,const size_t depth)

A description of each parameter follows:

image

the image.

channel

the channel.

depth

the image depth.