Archive for May, 2006

Annoucement of krita-plugins 1.5-1

As I have promised, the first release of Krita-plugins is available for download.

As described in my previous posts, this release include:
– some basic color filter(min/max, to alpha)
– color transfer
– adjustable blur
– unsharp mask
– a red eye removal tool

You can download it from the kde ftp servers or access to the kde-apps page.

krita-plugins 1.5-1 : image enhancement

Here are the last three plugins of the soon to be released krita-plugins, two filters: adjustable blur and unsharp mask and one tool: red-eye removal.

As for the tarball of those plugins, they should be available shortly, I will keep you informed.

Adjustable blur

It means you can adjust the size of the blur mask, bellow you can see how it works for the now classical Villa Savoye of le Corbusier:

Free Image Hosting at

Unsharp mask

Like its name state it, unsharp mask will sharpen the edge of the image (yes sharpen and not unsharpen which would be uninteresting). It’s the adaptation of an photographic technique, that consist of first bluring the image to detect edges, and then using the difference between the original picture and the blur version, we can increase the contrast near the edges.

You can find a better explanation ont this website:

Free Image Hosting at

Red-eye removal

Red-eyes might appears on picture taken with a flash (when you are able to keep your eye open). The red-eye removal tool will attempt to detect red eyes, if it fails, a simple click on a red eye will select it. Obviously, the Villa Savoye isn’t the best picture for demonstrating red-eye removal, so I will use a picture of me:

Free Image Hosting at

And then you will be able to correct it:

Free Image Hosting at

You have to note, that the autodetectionphase and the correction quality can vary significantly from one eye to an other, and it’s far to be perfect. ostly because, for the autodetection, at least for western-european and north-american, the skin isn’t white, but pink, and pink contains a lot of red, so you have to select a red zone inside a red zone.

As for correction, it tryes to make the eye less visible and not to restore it to what it should be like (in real life I have blue eyes not gray eyes like on the picture above), because that information is lost. The second problem is linked to the detection stage (wheter it is manual or automatic), you can have a small red ring usually of one pixel wide around the pixel, I am thinking about systematicaly increase the corrected area of one pixel.

An other konqi supporting koffice artwork

I found the time to play a little bit more with my tablet tuesday, and after yesterday Boudewijn’s blog entry about kubuntu, I found time today to complete a konqi wearing a “I love KOffice” t-shirt :

Free Image Hosting at

krita-plugins 1.5-1 : simple colors filters

21 May, 2006 2 comments

I remember the time I get involve in the krita project, my first visible feature was the invert filter, but it took me three months to write it. Mostly because there was a lot of infrastucture work to do before 🙂 But the point is that today’s filters are simple because I wrote them to test that writting filters outside krita was possible.

I will still use the original image of the Villa Savoye of Le Corbusier, mostly because I realy like the work of this guy:
Free Image Hosting at

Here is the result of a filter that will filter to leave only the minimal channel:

Free Image Hosting at

Here is the result of a filter that will filter to leave only the maximal channel:

Free Image Hosting at

This filter remove a color from the image and transform it to alpha to make it transparent, here I have selected a tone of blue and I have nearly remove the sky with a next gradient:

Free Image Hosting at

First steps with a tablet

It has been long time that I have wanted to buy a wacom tablet, and this week I did baught one and I received it

Configure it

As any hardware it nearly works out of the box. The kernel recognize it fine, but I had to fix my xorg.conf by hand. Sure, not a big work, but on windows it was just inserting the cd, a lot easier. But, true I am unfair, I have a kubuntu dapper (the upcoming 6.06 version) but upgraded from a breezy, and from the look of the xorg.conf on my laptop whose linux was installed from a dapper beta, their is no need to configure xorg by hand now in kubuntu. But still I will provide a link to the wacom linux howto :

Then, in krita, you have to enable the various tools in the setting dialog shown bellow:
Free Image Hosting at

Outlines of a flower

After the usual random draw to test how the tablet work, I decided to test it for real with a drawing. I will use a picture of a red flower as a model:
Free Image Hosting at

Drawing the outline of the flower seems pretty easy, but I am used to draw on paper where the pencil, the hand and the drawing match precisely. With a table, you have some sort of numerical link that is incert between the real pencil and the mouse cursor which makes it quiet hard to control exactly what you are drawing, but I was quiet happy with the result:

Free Image Hosting at


As you can see on the image bellow, for coloring I use a different layers than the outlines, mostly because it allow me to protect them. Then coloring consist mostly in selecting a color from the original picture, and to fill the areas:

Free Image Hosting at

The resulting image looks and feels like old fashion clipart, mostly because it lacks shadows and illumination, but I need to work a little bit more with the tablet before being able to draw them.

krita-plugins 1.5-1 : color transfer filter

12 May, 2006 6 comments

In a few days, I will release the first beta version of krita-plugins for Krita 1.5. It’s a collection of plugins that will be part of the next official release but that I make available as a seperate package for the current version (in fact, for the upcoming Krita 1.5.1).

Today, I will speak about the color transfer filter, it is a filter that analyse an image and transfer the color look and feel to an other image as you can see on the following examples.

The original image is the Villa Savoye of Le Corbusier:

Free Image Hosting at

I will first use a yellow flower as the reference image, as you can see it give a yellowish tint to the picture:

Free Image Hosting at

And then I use a tree under snow, and the result give the impression of that snow is falling on the Villa Savoye:

Free Image Hosting at

This filter is in fact mostly usefull if you want to do some photo montage, as it will allow to have an uniform color over your final result.

Kross : why choose between white and black ?

Since a few weeks, there have been an incredible amounts of KDE developers speaking about how their scripting language was the best in the world and that it should be considered as the VBA or AppleScript of the Open Source world (or at least of KDE) ! But, in fact, we all know that even if ruby is superior to anything else, a lot of people will refuse to acknowledge it and will want to use python, lua, javascript, perl… And, anyway, isn’t the open source world about choices ? So, why not support all of them ?

Because writing bindings is a lot of work, and writing one for several scripting languages is boring, and you will have an hard time to have a consistent API, and you will end up with several bindings which aren’t well supported. You can use automatic tools like swig to create the bindings for you, but you will export a bloated API while what you want is a simple and neat but powerful API. That was to answer those problems, that Sebastian Sauer wrote Kross for Kexi. And that’s why I started to use kross for scripting in Krita. Currently it only has support for python and ruby, but in the future we will add at least JavaScript, and adding in other scripting language is pretty easy.

Sebastian Sauer has setup a website with useful information about kross, some screenshots with kross in Kexi and Krita and especially with a tutorial, and as you can see, adding kross support to a kpart application is non intrusive and require a small quantity of code, as it works as a plugin, and then you need to write the binding.

Kross is currently shipped inside kofficelib, so if you have it installed you only need to install the development package, on the other hand, if you don’t have kofficelib and don’t want to install it, here you can find a tarball with the source code of the library.