RSS/Atom feed Twitter
Site is read-only, email is disabled

Gimp-user Digest, Vol 94, Issue 30

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

mailman.356786.1279989591.1... 07 Oct 20:21
  Gimp-user Digest, Vol 94, Issue 25 Dillon 24 Jul 18:55
   Gimp-user Digest, Vol 94, Issue 25 Kevin Cozens 25 Jul 20:31
mailman.1.1280084403.24276.... 07 Oct 20:21
  Gimp-user Digest, Vol 94, Issue 30 Bodo Eggert 30 Jul 21:50
Dillon
2010-07-24 18:55:06 UTC (over 14 years ago)

Gimp-user Digest, Vol 94, Issue 25

Is that really a "must" ? It turns out I was missing variable declarations, but I have never provided initial values when declaring variables in a let block, and that doesn't seem to cause issues.

I'll experiment.

On Sat, Jul 24, 2010 at 9:39 AM, wrote:

Message: 2

Date: Sat, 24 Jul 2010 11:45:24 -0400 From: Kevin Cozens
Subject: Re: [Gimp-user] Script-Fu for batch image conversion To: gimp-user
Message-ID:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dillon wrote:

(set! num-layers (car (gimp-image-get-layers newimage))) (set! layerIDs (cadr (gimp-image-get-layers newimage)))

What error messages do you get when the above lines are included?

(define (batch-save-as-xcf pattern) (let* (
(filelist (cadr (file-glob pattern 1))) (fileparts)
(xcfname)
(filename)
(image)
(newimage)
(drawable)
)

The declarations for variables "fileparts" through to "drawable" are wrong. You must provide an initial value when defining a variable in a let block.

The simple solution is to add a 0 or -1 to the declarations for numeric variables and "" string variables. Any value will work but it helps to stick to the a value similar to the type of value the variable could typically hold.

Kevin Cozens
2010-07-25 20:31:42 UTC (over 14 years ago)

Gimp-user Digest, Vol 94, Issue 25

Dillon wrote:

Is that really a "must" ? It turns out I was missing variable declarations, but I have never provided initial values when declaring variables in a let block, and that doesn't seem to cause issues.

Yes, it is a must unless you are using GIMP 2.4 or earlier. The TinyScheme component of GIMP more closely follows the Scheme standard. The standard requires variables in a lot block to have an initial value, and all variables must be declared before first use.

You should take a look at the Script-Fu migration guide at http://www.gimp.org/docs/script-fu-update.html and my notes at http://www.ve3syb.ca/wiki/doku.php?id=software:sf:updating-scripts (which cover most of the same points).

I think that this line is not returning the number of layers as we're expecting. I tried using gimp-message to write the number of layers out to the console, but it generates another batch execution error.

[snip]

(gimp-message "The current file has the following number of layers: ") (gimp-message num-layers)

The problem with the above is you are passing an integer to gimp-message instead of passing a string. You need to wrap num-layers in a call to number->string.

You can combine the two calls to gimp-message so the number of layers appears in the message by doing the following:

(gimp-message (string-append
"The current file has the following number of layers: " (number->string num-layers)))

Bodo Eggert
2010-07-30 21:50:48 UTC (over 14 years ago)

Gimp-user Digest, Vol 94, Issue 30

Message: 2
Date: Sun, 25 Jul 2010 14:36:19 -0400 From: saulgoode@flashingtwelve.brickfilms.com Subject: Re: [Gimp-user] Getting rid of the extra menubar window To: gimp-user@lists.XCF.Berkeley.EDU Message-ID:

Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed"

Quoting Bodo Eggert :

The image drop zone (which won't work for files displayed in the midnight commander anyway) is also available in the toolbox window (from where I'd like to remove it, too).

For this, you need to edit your 'gimprc' configuration file (found in $HOME/.gimp-2.6/ for GNU/Linux; on Windows the folder is something like %USER%/.gimp-2.6/). You should add the following line to the file:

(toolbox-wilber no)

Thanks. This option seems to be missing from the configuration dialoges.

Besides disabeling the drop zone on the toolbar, it disabled the extra window manager, and the menubar window will morph into an image window. This is not as good as the classic behaviour, but I can live with that if I must.