programmatically changing colours in a png file - Graphics
This is a discussion on programmatically changing colours in a png file - Graphics ; I am going to use for a particular project (astronomical database) a web
interface developed for another project. This includes a number (between
10 and 20) of buttons kept in .png files
What I want to do is use the ...
-
programmatically changing colours in a png file
I am going to use for a particular project (astronomical database) a web
interface developed for another project. This includes a number (between
10 and 20) of buttons kept in .png files
What I want to do is use the same buttons, but systematically change all
colour shades (say from brown-orange to blue-cyan) so that one can
visually tell is using the same interface but for a different project.
Each button (as from an xv load) has 65 different colours, so it is out
of consideration to use xv color edit and change manually their RGB for
65 colours x 20 files in a reproducible way.
Is there any way of doing it with a gimp script ?
--
----------------------------------------------------------------------
nospam@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
-
Re: programmatically changing colours in a png file
On Wed, 30 May 2007, LC's No-Spam Newsreading account wrote:
> What I want to do is use the same buttons, but systematically change all
> colour shades (say from brown-orange to blue-cyan)
> Is there any way of doing it with a gimp script ?
I managed to do something like that using the following script I adapted
from a former one, but still this is not fully batch. More specifically,
it opens the ColorMap Rotation filter window ... but I have to enter its
parameters MANUALLY (new angles and switch to clockwise) for each file.
Even if I run it from the same FU script console repeatedly, I have to
fill the ColorMap Rotation parameters each time ... it does not remember
them from the previous run.
Is there no way to pass full parameters to plug-in-rotate-colormap ?
BTW I'm using gimp 2.0.4 under Suse 9.2
(define
(script-fu-pngprova file )
(let*
(
( img (car (file-png-load 1 file file ) ) )
( outfile (string-append (car(strbreakup file ".") ) "_mod.png"))
)
; outfile
(gimp-image-convert-rgb img)
(set! drawable (car (gimp-image-active-drawable img) ) )
(plug-in-rotate-colormap 1 img drawable)
(file-png-save-defaults 1 img drawable outfile outfile)
)
)
--
----------------------------------------------------------------------
nospam@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
-
Re: programmatically changing colours in a png file
On 30 Mai, 15:07, LC's NoSpam Newsreading account
<nos...@mi.iasf.cnr.it> wrote:
> Is there no way to pass full parameters to plug-in-rotate-colormap ?
No.
You or someone else could extend the plug-in and add
a more feature-rich PDB interface, though. Please note that
the existing interface (plug-in-rotate-colormap) should be kept
for compatiblity, the default way to handle this is to introduce a
new function called e.g. plug-in-rotate-colormap2
> BTW I'm using gimp 2.0.4 under Suse 9.2
This is quite old. New additions should be based on the current 2.3
branch.
HTH,
Michael
Similar Threads
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 07-28-2007, 03:37 AM
-
By Application Development in forum Adobe Indesign
Replies: 8
Last Post: 01-18-2007, 12:50 PM
-
By Application Development in forum Perl
Replies: 5
Last Post: 12-04-2006, 06:29 AM
-
By Application Development in forum Smalltalk
Replies: 2
Last Post: 09-06-2006, 07:10 PM
-
By Application Development in forum basic.visual
Replies: 1
Last Post: 05-18-2004, 02:42 PM