Method: Magick::Image#color_profile

Defined in:
ext/RMagick/rmimage.cpp

#color_profileString?

Return the ICC color profile as a String.

  • If there is no profile, returns “”

  • This method has no real use but is retained for compatibility with earlier releases of RMagick, where it had no real use either.

Returns:

  • (String, nil)

    the ICC color profile



3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
# File 'ext/RMagick/rmimage.cpp', line 3026

VALUE
Image_color_profile(VALUE self)
{
    Image *image;
    const StringInfo *profile;

    image = rm_check_destroyed(self);
    profile = GetImageProfile(image, "icc");
    if (!profile)
    {
        return Qnil;
    }

    return rb_str_new((char *)profile->datum, (long)profile->length);

}