Final touch up with Cinepaint

OK, we are still in the process of producing a high quality (tiff 16bits/channel) image file from a RAW camera file, using Linux and a color managed workflow. Our example image is the “magic trees”. After the image selection, a quick and dirty post-processing, a careful processing with Ufraw, now is the time for the final touch up. We will be using Cinepaint for that, since the program is Color Managed and supports 16bits/channel.

What is left to do, anyway?

Most of the general color adjustments, curves, brightness and so on have been done in Ufraw, as close as possible to the original RAW file. However, there are some touch ups that cannot be done in Ufraw and which we will review here. We will to through each step, even if most of them were skipped in the “magic trees” picture.

Before we start, I wanted to mention here that when doing photographic work, a bright pink and green desktop wall paper is not a very good idea (not talking about taste, here…). You want to change your wall paper to a single color – neutral density, 18% grey:

  • 209 209 209 in rgb colors
  • #D1D1D1 in html colors
  • 0 0 82 in HSV colors

This helps your eye concentrate on your image colors rather than being distracted by the background. If you have a second screen, now is a good time to plug it in and fire up all the color management bells and whistles we have been talking about so far.

Rotation

Some RAW processing programs allow for arbitrary rotations, others don’t. Ufraw doesn’t, so in case your image has an unleveled horizon (or maybe this only happens to me…), now is a good time to straighten it up. Cinepaint doesn’t allow a preview of the file before rotation, so it is quite hard to guess how much rotation is enough. Undo is your friend there, but a time consuming friend (hence we go through that process for only a very few files…).

Cropping

Some would argue that any serious photographer should not crop an image (straight photography) while others pontificate on “The Art of Cropping“. I let you make your own opinion on that. I decided to remove a tad on both sides of my image to cut the picture at the end of a tree shape. But I don’t take it as a crucial post-processing step in this case. However, cropping to a square or a more panoramic view can dramatically change (and enhance) an image. Here again, try several versions (in the quick-processing step).

Dust removal

With all the care that we take in keeping our camera, camera bag, and lenses clean (you do, don’t you?) it may still happen that a nasty dust speck (or even several, grin) gets in the way and leave an unwanted signature on an image. It may also happen that due to a 95% viewfinder, there are some unwanted things close to the picture frame or just a pain old yellow ugly plastic bag somewhere that you’d want to remove.

Clone is your friend in this case: it allows to paint a place of the picture with another one (painting the electrical cable with some blue from somewhere close in the sky). It is not always easy to get good results, especially in gradients. Don’t forget that you can change the brush of the clone tool. Again, experiment. Remember that Cinepaint by defaults only allows for 5 undo steps, so be careful to keep a “before cloning” version of your file in case the cloning results are not very good on your first trial…

I didn’t do any cloning on the trees image, by the way.

Minor color adjustments

We already talked about the curves tool, but (unlike Ufraw) Cinepaint not only allows to work on the “overall curve” (value curve) but as well on each color value (Red-Green-Blue). So you can adjust very finely any color cast of your image. Remember that the curves work on a two colors axis: removing (adding) Red means adding (removing) Cyan, same for Green-Magenta and Blue-Yellow.

Again, once you get used to working with curves in this way, a tool like color-balance becomes superfluous.

In our trees image, I didn’t do any of these adjustments.

Local enhancements

So far, we mainly worked on the picture as a whole. However, it can be handy to darken a sky a little bit while keeping the rest of the image untouched, the dodge and burn from the wet lab days. These are the local enhancements which we will talk about now.

In Cinepaint, you create a new transparent layer. You then draw in black the areas you want to select, using any paint tool you wish – I very often use a black to transparent gradient. Right-click on the layer, choose add layer mask (use the layer’s alpha channel) and then mask to selection. You now have a selection exactly fitting your black area, including the progressiveness of the gradients – so the modified parts of the image will blend nicely with the rest of the original picture.

You can then select back your image layer, copy the selected area and paste it to a new transparent layer. Make any adjustments on this new layer (curves, colors…) until you are happy with the result. Clicking on the eye shows and hides the layer, so you can see how your image looks with and without the local modifications.

Be careful, Cinepaint has an annoying bug here: you need to click on the layer’s name to activate / select it. Clicking on the thumbnail will not do, the selection will follow your mouse pointer. Be also careful not to over-do it: it should only be touch-up at that stage or the blending (even with a gradient selection) will be very unnatural, photoshop like, dare I say.

In our trees image, I decided to remove a bit of blue from the bottom part of the image. Here is what the Cinepaint session looks like (click on the image for a better view). The bottom layer is my original picture, the middle layer is my selection mask and the top one is where I am removing a bit of blue.

cinepaint2.jpg

Once you are happy with the results, delete the mask layer and flatten your image. The left part is the original image, the right part has been modified (you may see the bottom part of the image is less blue in the dark tones, although it is not obvious at that scale):

cinepaint_comparison.jpg

Local contrast enhancement with unsharp mask

The unsharp mask (USM) has (in my opinion) two very different uses:

  • local contrast enhancement
  • details enhancements before printing or after resize

We will talk later about the second function, but using the USM with a large radius nicely boosts the local contrast of an image. As always, be careful not to over-do it. Check your image at 50% and make large usage of the undo button (the photographer’s best friend). Try setting the radius to 30 with an amount of 0.2 to 0.5 and a treshold at 5 – take these as faith values for now or check the wikipedia article. I should write a post about USM at some stage (that one is already long enough).

With the trees image, I used a radius of 30 with an amount of 0.1 to have a discreet effect. On the left is the original image, on the right the modified one (the right part is a tad more contrasty)

cinepaint_comparison2.jpg

This is viewed at 50%, so you can also see that the 80-320 zoom from Pentax, although a decent lense, is not a beast of sharpness 🙂

Sometimes, a side-effect of local contrast enhancement with USM is too much saturation. In this case, simply remove 10 to 15 (or even 20) points of saturation. That way, the contrast is still there, but you avoid flashy over-saturated images.

That’s it!

Now you can save your image as a 16bits/channel tiff. We have completed the production of our high quality image file in Linux with CMS. Congrats to us! Here is the file straight as it came out from the batch processing:

_igp6477_r.jpg

and here is our final version of the highest available quality:

trees_final.jpg

6 Responses to Final touch up with Cinepaint

  1. Tibor Bamhor says:

    Hi, Joel
    I like your site, because I´m both Linux (at home exclusively) user and I like to take photos and tinker with them in PC.
    I prefer gimp but maybe you persuaded me to work with cinepaint.
    But I have few questions.
    1. when I work in gimp I work with 256 colors – is it what 8bit depth means? And how many colors has 16bit tiff?
    2. when I open an jpg in cinepaint and want to work in 16bit depth and save it in 16 bit depth what do I need to do?
    3. tiffs are too big, lets say 5-10 MB, are there any other more effective formats avaiable, I mean for 16 bits depth?
    Ok, enough questions for now.
    Bye

  2. jcornuz says:

    Hi Tibor.

    Glad you like it.

    8bits means each color is coded on 256 levels (256Red, 256Green, 256Blue). That is more nuances than what our human eye can distinguish. However, when you start to tinker your images color, if calculations are made only with 256 levels (8bits), the overall quality and richness of nuances degrades. Hence the idea of using 16bits (about 65 000levels) to make sure the final output quality is as high as possible.

    In cinepaint, the image menu will give you a choice between 8bits / 16bits (and some other even higher quality formats). Just pick 16bits and the conversion is done. Remember, however, that JPG is a far less high quality image format than what you would get from a RAW (see my post on that).

    Sorry, tiffs are big, but it is the best choice for 16bits images archiving. I don’t know if png supports 16 bits and what the weight of it would be. Tiff is the standard.

    Take care.

    Joel

  3. Pedro Esteban says:

    Hi Joel,
    I have just discovered your web site, and I would say that it will became a reference, site for me because I am:

    -A only Linx user
    -A photo amateur.
    – And, like you, a happy Pentax user.
    – I like your site.

    By now I have a question for you: I have installed the Ubuntu Studio distribution with the aim of having access to install CinePaint, and for my disappointment I haven’t found any trace of that package in the synapthic. I have tried to install it directly from the Cinepaint web but I have readily ended ed in a endless compile error session. Can you give me, please, some indication of an easily way to obtain CinePaint.

    Thank you very much

    Pedro Esteban (“Despentinat” in Flick if ever you want and have the time to take a tour through my photostream)

  4. Bob Dion says:

    This is from the cinepaint mailing list archives.
    I was able to build from this source on a Debian system.

    Good Luck

    >> An other solution might be to pick the sources I used privately to build some Fedora RPMs.

    If you search at http://software.opensuse.org/search and pick home:bekun sources that might be an alternative. <<

  5. Davros says:

    Pedro:

    Due to someone getting behind in something needed by Cinepaint in Debian, Ubuntu is no longer offering Cinepaint. As things change quickly, usually for the worse when it comes to “little files” (like libaries files and other dependancies), with Ubuntu’s release cycle, it has been hard for people to try and add the support themselves. It can be touch and go. However, I can report with joy that I got Cinepaint working just fine (as far as I can tell right now) in Kubuntu 9.10 Karmic Koala.

    Add the Get Deb repository, then refresh and install through synpatic.

    Binary (deb)
    URI: http://archive.getdeb.net/ubuntu/
    Distribution: karmic-getdeb
    Section(s): apps

    Reload

    Search for Cinepaint.

    Apologies for the above comment. I hit the enter key by accident. Feel free to delete it.
    Hope that helps. Feel free to email with any questions.

Leave a comment