class ImageVise::SRGB

Applies the sRGB profile to the image. For this to work, your ImageMagick must be built witl LCMS support. On OSX, you need to use the brew install command with the following options:

$brew install imagemagick --with-little-cms --with-little-cms2

You can verify if you do have LittleCMS support by checking the delegates list that `$convert –version` outputs:

For instance, if you do not have it, the list will look like this:

$ convert --version
...
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib

whereas if you do, the list will include the “lcms” delegate:

$ convert --version
...
Delegates (built-in): bzlib freetype jng jpeg lcms ltdl lzma png tiff xml zlib

The corresponding Pipeline method is `srgb`.

Constants

PROFILE_PATH

Public Instance Methods

apply!(magick_image) click to toggle source
# File lib/image_vise/operators/srgb.rb, line 26
def apply!(magick_image)
  magick_image.add_profile(PROFILE_PATH)
rescue Magick::ImageMagickError
  magick_image.strip!
  magick_image.add_profile(PROFILE_PATH)
end