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

2002-09-05 Thread Simon Budig

Roland Roberts ([EMAIL PROTECTED]) 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
-- 
  [EMAIL PROTECTED]   http://www.home.unix-ag.org/simon/
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



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

2002-09-05 Thread Roland Roberts

 Simon == Simon Budig [EMAIL PROTECTED] writes:

Simon Roland Roberts ([EMAIL PROTECTED]) 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
[EMAIL PROTECTED] 76-15 113th Street, Apt 3B
[EMAIL PROTECTED]   Forest Hills, NY 11375
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



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

2002-09-05 Thread pcg

On Thu, Sep 05, 2002 at 11:40:14AM -0400, Roland Roberts [EMAIL PROTECTED] 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 ;)

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer