preload
Jan 16

If you want to printout or save info from manpages simply type:

1
man -t man | ps2pdf - > man.pdf
Tagged with:
Nov 10

Normally it is not ab problem to convert a CMYK picture to a RGB picture with Photoshop. But what do you do if you have e.g. thousands of high quality pictures, and you want to convert these so RGB? With Linux you can easily convert your files.

All you need is

  • ImageMagick
  • RGB Color profile e.g. ColorMatchRGB.icc or AdobeRGB1998.icc
  • CMYK Color profile e.g. USWebCoatedSWOP.icc (can be downloaded on adobe website)

Installing ImageMagick and downloading the color profiles can not be explained here.

Now to convert picture called cmyk.jpg to rgb simply enter the following command:

convert -profile /pfad/zum/profil/USWebCoatedSWOP.icc \ -profile /pfad/zum/profil/ColorMatchRGB.icc cmyk.jpg rgb.jpg

For not writing the the whole line for each file create a bash-script:

#!/bin/bash

cmyk_profile=”/pfad/zum/profil/USWebCoatedSWOP.icc”

rgb_profile=”/pfad/zum/profil/ColorMatchRGB.icc”

ifile=”$1″ ofile=`basename “$ifile” .jpg`”_rgb.jpg”

convert -profile “$cmyk_profile” -profile “$rgb_profile” “$ifile” “$ofile”

Save this script as cmyk2rgb.sh and make it executeable with

chmod +x cmyk2rgb.sh

Now you can call this via:

./cmxk2rgb.sh bild.jpg

And a file called bild_rbb.jpg will be created.

Now other fine things are possible like find all files with ending .jpg and convert them to rgb:

  for i in *jpg;
  do
    ./cmyk2rgb.sh "$i";
  done
Tagged with: