Re: [Gimp-developer] Script-Fu/Scheme---what is "#f"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Simon" == Simon Budig <Simon.Budig@xxxxxxxxxxx> writes:

    Simon> Roland Roberts (roland@xxxxxxxxxxxxx) 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
-- 
		       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@xxxxxxxxxxx                     76-15 113th Street, Apt 3B
roland@xxxxxxxxxxxxx                       Forest Hills, NY 11375


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux