[Digikam-devel] [Bug 141439] Whishlist: A velvia similar plugin. AKA vivid saturation

Gerhard Kulzer gerhard at kulzer.net
Wed Feb 14 15:41:29 GMT 2007


Am Monday 12 February 2007 schrieb Gilles Caulier:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=141439
>
>
>
>
> ------- Additional Comments From caulier.gilles kdemail net  2007-02-12
> 09:54 ------- hey guy,
>
> I have take a look into the vivid saturation gimp plugin : it's a script
> scheme  plugin...
>
> It's very simple gerhard. Look like the code is a few line :
>
> (define (script-fu-vivid-saturation inImg inDrw inAmount)
>
>   (let* (
>
> 	 (amount (/ inAmount 100)))
>
>     (gimp-image-undo-group-start inImg)
>
>     (plug-in-colors-channel-mixer TRUE inImg inDrw FALSE (+ 1 amount
> amount) (- amount) (- amount) (- amount) (+ 1 amount amount) (- amount) (-
> amount) (- amount) (+ 1 amount amount))
>
>     (define (spline)
>       (let* ((a (cons-array 8 'byte)))
> 	(set-pt a 0 0 0)
> 	(set-pt a 1 63 60)
> 	(set-pt a 2 191 194)
> 	(set-pt a 3 255 255)
> 	a))
>
>     (gimp-curves-spline inDrw 0 8 (spline))
>
>     (gimp-image-undo-group-end inImg)
>     (gimp-displays-flush)
>     )
>   )
>
>
> It's use color mixer and curve tools. both are include in digiKam and of
> course support 16 bits color depth (unlike gimp do!)
>
> Gerhard, try to reproduce the plugin using digiKam tools by hand and give
> me your viewpoint. From a developper point, i can do it in 5 minutes (:=)))
>
Hi Gilles, 
I tried it with the mixer [took me a while to get back into the scheme syntax, 
it should be called script-fou :-)] and it works well. 
What I could not verify it the spline function (the channel mixing is applied 
in a contrast enhanced manner: more inthe highlights, less in the shadows). I 
think I cannot reproduce it manually, that must be done under the hood. But 
even without spline the result looks quite promissing.

These are the values I tried (20% accentation):
# Channel Mixer Configuration File
CHANNEL: BLUE
PREVIEW: true
MONOCHROME: false
PRESERVE_LUMINOSITY: false
RED: 1.400 -0.200 -0.200
GREEN: -0.200 1.400 -0.200
BLUE: -0.200 -0.200 1.400
BLACK: 1.000 0.000 0.000

In gimp I needed only 6% to achieve the same effect. I believe the rest comes 
through the contrast amplification.

my 10ยข


-- 
Hakuna matata
http://www.gerhard.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20070214/076df248/attachment.sig>


More information about the Digikam-devel mailing list