CMYK RGB image and color softening

how

  • convert from RGB to CMYK
  • soften / reduce color weight (avoid melt in a printing press)

in ruby? This is a rails app. The links are ok, awsome code examples.

+4
source share
2 answers

First, make sure you have imagemagick compiled with LCMS (on mac brew install imagemagick --with-little-cms ). You probably need to reinstall the rmagick stone after reinstalling imagemagick.

Next, get the Adobe ICC color profiles (again, this is for the Mac, but I'm sure it’s not hard for you to find versions for other platforms).

Then run your editor and do something in that direction.

 image = Image.read("my_image.jpg")[0] image.colorspace = Magick::CMYKColorspace image.add_profile("path_to/adobe_icc_profiles/CMYK/USWebCoatedSWOP.icc") image.write("my_image_cmyk.jpg") 
+1
source

I would say use RMagick: http://rmagick.rubyforge.org/

Be sure to use version 2 onwards, although it also works with Ruby 1.9. Version 1 only works with 1.8.

However, as an example, I am not insanely experienced with ImageMagick. You can start here, though:

http://www.imagemagick.org/script/command-line-tools.php

0
source

All Articles