It is currently Mon Oct 23, 2017 8:57 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Transfer colors from one image to another (script)
PostPosted: Sun Nov 29, 2015 10:08 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2870
Location: Tin from Victoria BC Canada
There's probably already something that does this :oops: ...but I wrote a simple script that does this.

You need to have an image, and another image to grab colors from.
Script will be available under Script-Fu/Create New/Transfer colors...
Attachment:
TransferColor.scm [2.3 KiB]
Downloaded 164 times


here are samples of what i did.
Mona lisa using colors from starry night and vice versa.
Image
Image

and here i just made an image with gradients from black to dark red, from dark red to medium blue and from medium blue to light green and then from light green to bright yellow and used it as color image to transfer colors from.
here's the result
Image

_________________
T.
Image gimplearn.net                                                                           


Last edited by trandoductin on Mon Nov 30, 2015 3:44 pm, edited 3 times in total.

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: Transfer colors...
PostPosted: Mon Nov 30, 2015 10:48 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5130
Location: Metro Vancouver, BC
Interesting Tin, I'll give it a go.
{Edit}
I don't think it should permanently change the state the original image. If you want to run it again with a different color count you have to revert the original.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Transfer colors...
PostPosted: Mon Nov 30, 2015 11:56 am  (#3) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6837
Location: roma, italy
Odin, the filter creates a NEW image.
Thus, you can repeat it by setting again active the image you want to change, change the parameters and run the filter.

Edit: I understand what you meant: it's the SOURCE image that is permanently changed! Yes it's an error IMO too.

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Transfer colors...
PostPosted: Mon Nov 30, 2015 12:14 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5130
Location: Metro Vancouver, BC
dinasset wrote:
Odin, the filter creates a NEW image.
Thus, you can repeat it by setting again active the image you want to change, change the parameters and run the filter
Yes, a new image is created but my source image changed as well.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Transfer colors...
PostPosted: Mon Nov 30, 2015 12:15 pm  (#5) 
Offline
GimpChat Member

Joined: Jan 20, 2013
Posts: 6837
Location: roma, italy
Tin,
it looks interesting, I guess you have to correct what noticed by Odin

_________________
Vanitas vanitatum et omnia vanitas.


Top
 Post subject: Re: Transfer colors...
PostPosted: Mon Nov 30, 2015 1:45 pm  (#6) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2870
Location: Tin from Victoria BC Canada
thanks Odin.
I have made it to create a new image (copy of the source image to grab colors from) and work on that then delete it after so that source image is unchanged.
PS... I was hoping to see people's play with stealing colors from other masterpieces/paintings.

_________________
T.
Image gimplearn.net                                                                           


Top
 Post subject: Re: Transfer colors...
PostPosted: Mon Nov 30, 2015 2:26 pm  (#7) 
Offline
GimpChat Member

Joined: Jul 11, 2010
Posts: 291
@trandoductin
there was a script a long while ago, that had the same name and the same purpose. Maybe people think it is the same script? I had limited success with that script. I have downloaded yours to try when I get a chance.

Also, you may want to mention that it is a script in the title so people interested in scripts will take a look.


Top
 Post subject: Re: Transfer colors from one image to another (script)
PostPosted: Mon Nov 30, 2015 2:42 pm  (#8) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2870
Location: Tin from Victoria BC Canada
:hehe There i changed the title.

here i used gradient from black to dark blue, dark blue to yellow and yellow to white.
Image

_________________
T.
Image gimplearn.net                                                                           


Top
 Post subject: Re: Transfer colors from one image to another (script)
PostPosted: Mon Nov 30, 2015 9:28 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 691
http://www.silent9.com/blog/archives/16 ... Match.html

An example here:
viewtopic.php?f=9&t=3263

It is quite a bit different in operation that yours, though, as it actually tries to preserve the histogram's shape when mapping. The convert to indexed and remap palette you implemented is definitely faster.

There was also the gimp Match Colours script here: http://www.ve3syb.ca/software/gimp/myscripts.html based on this technique

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Transfer colors from one image to another (script)
PostPosted: Mon Nov 30, 2015 11:43 pm  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2870
Location: Tin from Victoria BC Canada
RobA wrote:
http://www.silent9.com/blog/archives/162-Gimp-Script-Histogram-Match.html

An example here:
viewtopic.php?f=9&t=3263

It is quite a bit different in operation that yours, though, as it actually tries to preserve the histogram's shape when mapping. The convert to indexed and remap palette you implemented is definitely faster.

There was also the gimp Match Colours script here: http://www.ve3syb.ca/software/gimp/myscripts.html based on this technique

-Rob A>

Histogram match sounds much more advanced than my script... faster isn't always better.. I'll have to give this histogram match a try..very curious. thanks..

_________________
T.
Image gimplearn.net                                                                           


Top
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Transfer colors from one image to another.

77

No new posts Attachment(s) Selection transfer to Image Map polygon (solved - script)

14

No new posts getting colors from the image

34

No new posts Attachment(s) Script 8 Colors (experimental)

11

No new posts alpha to different colors script request.

4


cron

* Login  



Powered by phpBB3 © phpBB Group