Method: Magick::Image#gray?

Defined in:
ext/RMagick/rmimage.cpp

#gray?Boolean

Return true if all the pixels in the image have the same red, green, and blue intensities.

Returns:

  • (Boolean)

    true if image is gray, false otherwise



7956
7957
7958
7959
7960
7961
7962
7963
7964
# File 'ext/RMagick/rmimage.cpp', line 7956

VALUE
Image_gray_q(VALUE self)
{
#if defined(HAVE_SETIMAGEGRAY)
    return has_attribute(self, (MagickBooleanType (*)(const Image *, ExceptionInfo *))SetImageGray);
#else
    return has_attribute(self, IsGrayImage);
#endif
}