Post Reply 

TinyScheme Color

Apr 5, 2011, 16:47
Post: #1
TinyScheme Color
Hello People,

I'm trying to control Gimp in console mode.

I want to pass some colors in arguments to the following script :
(define (myScript filename jvar1 jvar2  jvar3)
   (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
          (drawableChannel (car (gimp-image-get-active-channel image)))
          (selection (car (gimp-image-get-selection image)))
        (width (car (gimp-drawable-width image)))
            (height (car (gimp-drawable-height image)))
            (drawable (car (gimp-image-get-active-layer image))))

    (gimp-context-set-background '(jvar1 jvar2 jvar3))

The script then uses the color (i select stuff and fill them with it).

I call the script by the following command :
gimp -i -b '(myScript  "/home/alexis[/quote]/chart.png" 15 80 50)' -b '(gimp-quit 0)'^C

My problem is the following : the color rendered is fully white.

My understanding is that the jvars are somehow converted to 255.

Could somebody help me to fix that ?

Find all posts by this user
Quote this message in a reply
Sep 6, 2011, 02:18
Post: #2
RE: TinyScheme Color
    (gimp-context-set-background '(jvar1 jvar2 jvar3))

The problem is how you have defined the list with the colour values. What you have done will create a list with three symbols instead of a list with the value of each variable.

Change '(jvar1 jvar2 jvar3) to (list jvar1 jvar2 jvar3).
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  I need a way to quantify the color intensity of redness in a picture. marlohall 3 417 Jan 14, 2019 09:22
Last Post: paynekj
  Script fu and Color to alpha john 4 1,432 Sep 20, 2014 08:46
Last Post: rich2005
  Color menuitems in script or plugin Barbie 2 1,078 Sep 15, 2014 08:09
Last Post: rich2005
  Easy Color gfb 1 838 May 4, 2014 02:05
Last Post: gfb
  'do not write color space information' in script-fu eab 0 819 Aug 13, 2013 10:03
Last Post: eab

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS