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

Script-Fu/Scheme---what is "#f"

This discussion is connected to the gimp-developer-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.

4 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

20020904202400.C01821F04A@l... 07 Oct 20:21
  Script-Fu/Scheme---what is "#f" Roland Roberts 04 Sep 23:07
   Script-Fu/Scheme---what is "#f" Simon Budig 05 Sep 08:30
    Script-Fu/Scheme---what is "#f" Roland Roberts 05 Sep 17:40
     Script-Fu/Scheme---what is "#f" Marc) (A.) (Lehmann 05 Sep 17:43
Roland Roberts
2002-09-04 23:07:51 UTC (over 21 years ago)

Script-Fu/Scheme---what is "#f"

I'm trying to write write a script-fu to automatically take a finished image and produce a set of scaled images for display on a web site. The learning curve for this is rather steep....

To get started, I've been reading through some of the existing scheme files. One I am looking at is script-fu-unsharp-mask. There appears to be an idiom that I can't figure out, a series of lines like this:

(original-layer-for-darker #f) (original-layer-for-lighter #f)
(blured-layer-for-darker #f)
(blured-layer-for-lighter #f)

what is the "#f"?

roland

Simon Budig
2002-09-05 08:30:58 UTC (over 21 years ago)

Script-Fu/Scheme---what is "#f"

Roland Roberts (roland@astrofoto.org) wrote:

I'm trying to write write a script-fu to automatically take a finished image and produce a set of scaled images for display on a web site. The learning curve for this is rather steep....

If it is just about scaling and/or do simple adjustments to the image you might want to look at the imagemagick tools. Usually these are better for simple tasks and the learning curve for these is not steep at all.

To get started, I've been reading through some of the existing scheme files. One I am looking at is script-fu-unsharp-mask. There appears to be an idiom that I can't figure out, a series of lines like this:

(original-layer-for-darker #f) (original-layer-for-lighter #f)
(blured-layer-for-darker #f)
(blured-layer-for-lighter #f)

what is the "#f"?

Just a shortcut for '(), or FALSE. #t would be 1 or TRUE. However, I think these values are not used at all. They appear in the declaration of variables and are unused default values.

Bye, Simon

Roland Roberts
2002-09-05 17:40:14 UTC (over 21 years ago)

Script-Fu/Scheme---what is "#f"

"Simon" == Simon Budig writes:

Simon> Roland Roberts (roland@astrofoto.org) wrote: >> I'm trying to write write a script-fu to automatically take a >> finished image and produce a set of scaled images for display >> on a web site. The learning curve for this is rather steep....

Simon> If it is just about scaling and/or do simple adjustments to Simon> the image you might want to look at the imagemagick Simon> tools. Usually these are better for simple tasks and the Simon> learning curve for these is not steep at all.

I haven't played with ImageMagick, so I'm not sure how good a job it does when rescaling. I've been using the GIMP because it's downsampled images look pretty good, at least as compared to using the netpbm tools.

Plus, I do most of my final editing in the GIMP---I create a set of layers that overlay information onto the base image to be used as a web rollover (see, for example,
http://www.astrofoto.org/gallery/constellations/view.html?con=her for a recent example). Since I'm already working in the GIMP, I figured I'd just add the feature there rather than have to fire up another tool. I already have to do preliminary photo adjustments with a Windoze tool (Picture Works Pro) since I want to work with 16-bits/color until near the end.

Scheme is not the problem, per se (hey! I learned Scheme 20 years ago sitting in class with Abelson and Sussman *before* they printed the book). It's all the GIMP stuff and the SIOD idioms that keep tripping me. That and 20 years of messing more Emacs lisp than Scheme....

>> There appears to be an idiom that I can't figure out, a series >> of lines like this:

>> (original-layer-for-darker #f)

>> what is the "#f"?

Simon> Just a shortcut for '(), or FALSE. #t would be 1 or TRUE. Simon> However, I think these values are not used at all. They Simon> appear in the declaration of variables and are unused Simon> default values.

Okay, thanks. I'm not sure why the author did that; I would have just written

(let* ((...)
original-layer-for-darker ...)
Anyway, I have the basic rescaling of a copy working and it loops over the set of sizes I specify. I'm now adding code to copy all of the layers instead of just the background layer as well as to copy layer attributes correctly. I figured out, by trial and error, that whatever it was wasn't important for me.

roland

Marc) (A.) (Lehmann
2002-09-05 17:43:48 UTC (over 21 years ago)

Script-Fu/Scheme---what is "#f"

On Thu, Sep 05, 2002 at 11:40:14AM -0400, Roland Roberts wrote:

I haven't played with ImageMagick, so I'm not sure how good a job it does when rescaling. I've been using the GIMP because it's downsampled images look pretty good, at least as compared to using the

When using the right settings, ImageMagick usually does a much higher quality job, at a very much higher memory and cpu cost ;)