preload
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:
Nov 10

From now on I will be switching to english due to learning purposes.

Tagged with:
Nov 10

Damit man eine E-Mail mit den entsprechenden Diffs der Quellcodeänderung bekommt muss man lediglich folgende Zeilen in die Subversion-Datei hooks/post-commit im entsprechenden Projekt hinzufügen:

/usr/local/bin/svnnotify                    \
–repos-path    “$REPOS”                \
–revision      “$REV”                  \
–subject-cx                            \
–with-diff                             \
–handler       HTML::ColorDiff         \
–to            my@mail.com   \
–from          myfrom@mail.com

Um jetzt einen sogenannten post-commit-hook zu trac zu erzeugen, trägt man in der selbigen Datei noch folgendes ein:

/usr/bin/python /usr/local/bin/trac-post-commit-hook -p “$TRAC_ENV” -r “$REV”

Das ermöglicht Kommandos im Subversion Kommentar wie z.B. “fix #3″ um Ticket Nummer 3 zu schließen.

Tagged with: