Logo Search packages:      
Sourcecode: jmagick version File versions  Download package

void magick::MagickImage::setGrayscale (  )  throws MagickException [inline]

Convert any colored image to grayscale.

Deprecated:
Use QuantizeInfo with MagickImage.quantizeImage to acheive the same effect.
Exceptions:
MagickException on error

Definition at line 1098 of file MagickImage.java.

References quantizeImage(), magick::QuantizeInfo::setColorspace(), magick::QuantizeInfo::setNumberColors(), and magick::QuantizeInfo::setTreeDepth().

    {
      QuantizeInfo quantizeInfo = new QuantizeInfo();
      quantizeInfo.setColorspace(ColorspaceType.GRAYColorspace);
      quantizeInfo.setNumberColors(256);
      quantizeInfo.setTreeDepth(8);
      quantizeImage(quantizeInfo);
    }


Generated by  Doxygen 1.6.0   Back to index