It is currently Wed Jul 24, 2024 6:27 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: GIMP recoloring algorithm
PostPosted: Fri Mar 20, 2015 6:20 am  (#1) 
Offline
New Member

Joined: Mar 19, 2015
Posts: 3
Hello every one;

I would love to know which colorization/recoloring algorithm GIMP uses in a case like this one:

On a website called digidesignresort and the tutorial namedhow-to-recolor-elements-and-papers-in-gimp/

(I can not post the link)

If someone could point me to the source code/algorithm I will be glad.

Thank you in advance

Begueradj


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: GIMP recoloring algorithm
PostPosted: Fri Mar 20, 2015 8:12 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
AFAIK the native filter Colours/Colourise first desaturates the selected area/image then applies the selected hue according to the value of the grey pixels

_________________
"Where am I ?"


Top
 Post subject: Re: GIMP recoloring algorithm
PostPosted: Fri Mar 20, 2015 8:24 am  (#3) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
http://fossies.org/dox/gimp-2.8.14/pain ... tml#l00501

Line 539:
  dest[b] = (affect[b] ? INT_BLEND (src2[b], src1[b], opacity, tmp) : src1[b]);

INT_BLEND is a C macro defined in paint-funcs-utils.h thus:
#define    INT_MULT(a, b, t)   ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8))
#define    INT_BLEND(a, b, alpha, tmp)   (INT_MULT((a) - (b), alpha, tmp) + (b))


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Edge Extract - Edge Neon's algorithm in transparent background

9



* Login  



Powered by phpBB3 © phpBB Group