[Gimp-user] GAP scripting?

2007-11-07 Thread Steve Kelem
I need to do a complicated GAP animation.
It involves many steps that I will probably need to redo several times.
A script that I could edit and re-run multiple times so that I can get
it right.

Thanks for your help,
Steve

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread Kevin Cozens
Dave 77459 wrote:
> Owen,
> 
> Thanks for confirming that it works in 2.2 under Ubuntu and crashes on 2.4.
> 
> I too got that unbound error on 2.4 .  I declared all the variables, 
> which cleared that up under Windows.  I still got the unbound error in 
> Ubuntu, which is odd since set-pt is a function, not a variable??
> 
> So I added this in the hopes it would clear up:
> 
>; define the set-pt procedure (used to be embedded??)
>; from http://adrian.gimp.org/scripts/shagadelic.scm
>(define (set-pt a index x y)
[snip]

The script calls set-pt but did not define the function. In GIMP 2.2 functions 
in one file were defined in a way that made them available to be called by 
scripts in other files. While this can be a useful feature at times it can 
also cause problems.

There were two scripts that defined point-list->double-array which took one 
argument. The routines were different and as a result, one of the two scripts 
appeared to be broken as it wound up calling the wrong version of the function.

As of GIMP 2.4, the scripts which ship as part of the Script-Fu plug-in define 
the functions they need locally (ie. other scripts can't access them). This 
avoids the problems of adding a new script and finding out that some other 
previously working script no longer works.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/   |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172  |"Same thing we always do, Pinkutus:
 |  Try to assimilate the world!"
#include  |  -Pinkutus & the Borg
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread Dave 77459
Owen,

Thanks for confirming that it works in 2.2 under Ubuntu and crashes on 2.4.

I too got that unbound error on 2.4 .  I declared all the variables, which
cleared that up under Windows.  I still got the unbound error in Ubuntu,
which is odd since set-pt is a function, not a variable??

So I added this in the hopes it would clear up:

   ; define the set-pt procedure (used to be embedded??)
   ; from http://adrian.gimp.org/scripts/shagadelic.scm
   (define (set-pt a index x y)
 (prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)
 )
   )

This is added before the "(define (splineValue)"

It appears that set-pt is defined ("built-in?") in the Windows 2.4.1 build
but not Ubuntu 2.4?

However, with that function thus defined, the Ubuntu version behaves as
quirkily as the Windows version.  Doesn't appear to do anything, but
proceeds to make GIMP act weirdly.

This odd behavior is why I am appealing for help.  I appreciate your
sleuthing.

Dave


On Nov 7, 2007 3:14 PM, <[EMAIL PROTECTED]> wrote:

> >> Following is my "Urban Acid" Script-Fu program.  It attempts to
> simulate
> > the
> >> famous Photoshop Urban Acid action, which dramatically alters the color
> > curves.
> >> The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having
> the
> >> following problems:
> >> * The first time, it runs but the working layer shows no difference.
> > Indeed, even the mode is not set to overlay.
> >> * The second time executed, not seems to happen.  Not even a copy layer
> > is
> >> created.
> >> * GIMP seems to increasingly act weird after that.  Scripts may or may
> > not
> >> run.  The entire experience looks like a memory over run.
> >> I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
> > 2.4under Windows and also Ubuntu (Gutsy Gibbon).
> >
> >
> > Using Ubuntu-7.4
> >
> > Gimp-2.2 the script works fine
> >
> > Running on Gimp-2.4 throws the following error
> >
> > Error while executing
> > (urban-acid 1 2)
> > Error: eval: unbound variable: set-pt
> >
> >
> > But I am not up with Script-fu so will leave debugging to others
>
>
> Ah ha, read some more mail, and this one from Tobias Jakobs points to the
> Script-fu changes which include;
>
>
> By far, the most common problem that can be expected if using an older
> script is that it might assign a value to a variable without first
> declaring the variable. SIOD-based Script-fu would permit a statement such
> as (set! x 4) even if 'x' had not been declared -- 'x' would be defined
> automatically to be a global variable. The new Script-fu protects against
> this situation and the programmer must declare the variable first. The
> offending script would result in an error message stating, "Error: set!:
> unbound variable: x".
>
>
>
> Owen
>
>
> ___
> Gimp-user mailing list
> Gimp-user@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
>
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Wacom Intuos 3 quirk with 2.4.1

2007-11-07 Thread Chris Mohler
On Nov 7, 2007 1:06 AM, Paul Bamford <[EMAIL PROTECTED]> wrote:
> OK, I have to ask - how did you get the damn thing working in the first
> place?

It was pretty easy on Gutsy - I had to uncomment three lines in
xorg.conf and restart the X server.

Chris
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Not saving resolution information - "XCF: This file is corrupt!"

2007-11-07 Thread CJ Kucera
CJ Kucera wrote:
> Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp
> isn't saving the layer dimensions in its .XCF files, so that when the
> file is opened, Gimp gives the error:

Oh, now THIS is interesting...  It looks like this is only happening
when I'm working on files that are being served over NFS.  I've got a
central fileserver at home where I mount /home from, which is where most
of my Gimp files are contained.  The couple that I had tried that had
worked were outside /home but I didn't think to see if that was the
causative case or not.

I'll be digging around more to see if I can figure out what's going on
more specifically, but it'd be nice to see if anyone else can reproduce
it by saving to an NFS share.

-CJ

-- 
WOW: Flemmy|   "The ships hung in the sky in much the same
[EMAIL PROTECTED]   |way that bricks don't." - Douglas Adams,
24.24.2.3171   | _The Hitchhiker's Guide To The Galaxy_
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] trace script-fu commands while using GUI

2007-11-07 Thread Kevin Cozens
Juergen Weber wrote:
> Tracing the commands would be a light variant of this. Outputting a
> trace should not be more than some log statements, would it?

> And http://bugzilla.gnome.org/show_bug.cgi?id=51937#c25 allready has
> my suggestion.
> 
> Anyway, a pity that the bug has been opened in 2001 and still no
> Script recorder in Gimp core.

The comments in the bug report explain why it is not an easy thing to do and 
why it hasn't been done before now. Comment #26 and #27 mention the 
difficulties of implementing this feature.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/   |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172  |"Same thing we always do, Pinkutus:
 |  Try to assimilate the world!"
#include  |  -Pinkutus & the Borg


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] bugzilla spamming gimp users ?

2007-11-07 Thread olive
Sven Neumann wrote:
> Hi,
> 
> On Tue, 2007-11-06 at 17:51 +0100, olive wrote:
> 
>> I was away for 5 days and have 20+ messages from gimp buzilla in my 
>> inbox. I am in the CC field of new bugs... why ?
>> I noticed that more than half of the bugzilla messages I received result 
>> from 2 other people removing themselves from the CC list, so we are at 
>> least three receiving undesired messages from bugzilla when new bugs are 
>> opened.
> 
> We had a Bugzilla user who filed a couple of enhancement requests and
> for whatever reason included a large list of email address in the Cc:
> fields. If you are annoyed, please send him a mail and ask him to stop
> this.
> 
> 
> Sven
Hi,

Well, if the problem is due to a one-time error, I guess it will not 
happen again(*). I was more afraid of having been added by mistake to 
the list of people who received automatic emails from bugzilla if a bug 
report is opened for a component (I hope what I mean is clear enough :-/ ).

Thanks for the explanation,

Best regards,

Olivier.
(*) If it were to happen again, I would follow your advice.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread rcook
>> Following is my "Urban Acid" Script-Fu program.  It attempts to
simulate
> the
>> famous Photoshop Urban Acid action, which dramatically alters the color
> curves.
>> The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having
the
>> following problems:
>> * The first time, it runs but the working layer shows no difference.
> Indeed, even the mode is not set to overlay.
>> * The second time executed, not seems to happen.  Not even a copy layer
> is
>> created.
>> * GIMP seems to increasingly act weird after that.  Scripts may or may
> not
>> run.  The entire experience looks like a memory over run.
>> I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
> 2.4under Windows and also Ubuntu (Gutsy Gibbon).
>
>
> Using Ubuntu-7.4
>
> Gimp-2.2 the script works fine
>
> Running on Gimp-2.4 throws the following error
>
> Error while executing
> (urban-acid 1 2)
> Error: eval: unbound variable: set-pt
>
>
> But I am not up with Script-fu so will leave debugging to others


Ah ha, read some more mail, and this one from Tobias Jakobs points to the
Script-fu changes which include;


By far, the most common problem that can be expected if using an older
script is that it might assign a value to a variable without first
declaring the variable. SIOD-based Script-fu would permit a statement such
as (set! x 4) even if 'x' had not been declared -- 'x' would be defined
automatically to be a global variable. The new Script-fu protects against
this situation and the programmer must declare the variable first. The
offending script would result in an error message stating, "Error: set!:
unbound variable: x".



Owen


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread rcook
> Following is my "Urban Acid" Script-Fu program.  It attempts to simulate
the
> famous Photoshop Urban Acid action, which dramatically alters the color
curves.
>
> The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having the
> following problems:
>
> * The first time, it runs but the working layer shows no difference.
Indeed, even the mode is not set to overlay.
>
> * The second time executed, not seems to happen.  Not even a copy layer
is
> created.
>
> * GIMP seems to increasingly act weird after that.  Scripts may or may
not
> run.  The entire experience looks like a memory over run.
>
> I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
2.4under Windows and also Ubuntu (Gutsy Gibbon).


Using Ubuntu-7.4

Gimp-2.2 the script works fine

Running on Gimp-2.4 throws the following error

Error while executing
(urban-acid 1 2)
Error: eval: unbound variable: set-pt


But I am not up with Script-fu so will leave debugging to others


Owen




___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Wacom Intuos 3 quirk with 2.4.1

2007-11-07 Thread Simon Nickau
I seem to have to select the tool every time I start up GIMP on this
tablet pc.. Not much of a bother though

On 07/11/2007, Chris Mohler <[EMAIL PROTECTED]> wrote:
> Never mind.  I *forgot* that you can just select a tool while using
> either end of the pen.  Somehow I thought that the 'eraser' was always
> the eraser tool in gimp - though I have no idea why.  The actual
> behavior is much better IMO.
>
> Chris
> ___
> Gimp-user mailing list
> Gimp-user@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
>
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread Dave 77459
Following is my "Urban Acid" Script-Fu program.  It attempts to simulate the
famous Photoshop Urban Acid action, which dramatically alters the color
curves.

The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having the
following problems:

* The first time, it runs but the working layer shows no difference.
Indeed, even the mode is not set to overlay.

* The second time executed, not seems to happen.  Not even a copy layer is
created.

* GIMP seems to increasingly act weird after that.  Scripts may or may not
run.  The entire experience looks like a memory over run.

I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
2.4under Windows and also Ubuntu (Gutsy Gibbon).

Thanks for any help.  Source follows.

Dave
--
; Urban Acid
; David Hathaway <[EMAIL PROTECTED]>
;
; A script to fake the "Urban Acid" look within The Gimp version 2.
;
; This script is based on:
;
http://www.scrapjazz.com/community/jazzclub/showthread.php?t=89073&page=3&pp=15
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
; Version 0.5 - first working version
; Version 0.6 - modified to work on GIMP 2.4


(define (urban-acid img
drawable)

  ; set some system variables
  (let*
   (
  (copy-layer)
  (splineValue)
  (splineRed)
  (splineGreen)
  (splineBlue)
  (a)
   )

   ;7) create a duplicate layer of the base layer.
   (set! copy-layer (car (gimp-layer-copy drawable 0)))
   (gimp-layer-set-name copy-layer "Copy")
   (gimp-image-add-layer img copy-layer 0)

   (define (splineValue)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 44 27)
(set-pt a 2 99 117)
(set-pt a 3 195 229)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer VALUE-LUT 10 (splineValue))

   (define (splineRed)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 51 6)
(set-pt a 2 151 137)
(set-pt a 3 204 228)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer RED-LUT 10 (splineRed))

   (define (splineGreen)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 38 31)
(set-pt a 2 125 129)
(set-pt a 3 197 223)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer GREEN-LUT 10 (splineGreen))

   (define (splineBLue)
  (let* ((a (cons-array 8 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 22 33)
(set-pt a 2 149 126)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer BLUE-LUT 8 (splineRed))

   (gimp-layer-set-mode copy-layer HARDLIGHT-MODE)
   (gimp-layer-set-opacity copy-layer 80)

  ) ; let*

  ; Flush the display
  (gimp-displays-flush)
)

(script-fu-register "urban-acid"
"U_rban Acid"
"This script sets the curves based on the Urban Acid
formula"
"David Hathaway <[EMAIL PROTECTED]>"
"(c) David Hathaway"
"2007 11 01"
"RGB*"
SF-IMAGE"Image" 0
SF-DRAWABLE "Layer to start on (unused)" 0
)
(script-fu-menu-register "urban-acid"
 "/Filters/Dave77459")
; "/Script-Fu")
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu help?

2007-11-07 Thread Tobias Jakobs
On Nov 7, 2007 8:53 PM, Dave 77459 <[EMAIL PROTECTED]> wrote:
> I have some scripts I am upgrading to work with 2.4.  What is the best place
> to find help?

This list is the right place. I think the fastes way to get help is
the GIMP IRC channel.
If you are updating from 2.2 to 2.4 you can find here an Script-Fu
Migration Guide:
http://gimp.org/docs/script-fu-update.html

Regards,
Tobias
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-Fu help?

2007-11-07 Thread Dave 77459
I have some scripts I am upgrading to work with 2.4.  What is the best place
to find help?

I've asked the question before in this list, and found help here. I don't
want to send these help requests if they are unwelcome or if there is an
official, better place.  Gimp-developer seems focused on changing the
source, rather than scripts.

TIA,

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Not saving resolution information - "XCF: This file is corrupt!"

2007-11-07 Thread CJ Kucera
Sven Neumann wrote:
> I can reproduce the problem loading "goinonboat2.xcf". But I can load
> "goinonboat.xcf" without a problem, then save it again and the result
> seems to be just fine.

Yeah, I had a feeling that reproduction would be difficult on this one.

> Are you using any unusual compiler settings? Since you are using Gentoo,
> we are likely going to attempt to blame you for this problem. So you
> better try to convince me that your compiler settings are sane...

No, my CFLAGS are just "-mtune=athlon-xp -O2 -pipe" which I think are
pretty conservative.  I suppose I should try just building it up by hand
to see if that has any bearing - I'll give that a go.

-CJ

-- 
WOW: Flemmy|   "Happiness isn't good enough for me!  I
[EMAIL PROTECTED]   |  demand euphoria!"
24.24.2.3171   |  - Calvin
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Not saving resolution information - "XCF: This file is corrupt!"

2007-11-07 Thread Sven Neumann
Hi,

On Tue, 2007-11-06 at 12:31 -0600, CJ Kucera wrote:

> Anyway, I'm using Gimp 2.4.1, and I've encountered a problem where Gimp
> isn't saving the layer dimensions in its .XCF files, so that when the
> file is opened, Gimp gives the error:
> 
>XCF: This file is corrupt!  I have loaded as much of it as I can,
>but it is incomplete.
>
> I haven't yet figured out exactly what causes this to happen - some
> images I have don't exhibit this behavior, though most do.
> 
> I've gone so far as to open up a file that I had created with an
> older version of Gimp and re-save it without any edits.  When I
> compare the two files, there are only a few bytes that differ, and it
> turns out that it's the dimensions which are showing up as "0"
> instead of the proper dimensions.  You can see that at this URL:
> http://apocalyptech.com/media/gimp/
>   
>  * goinonboat.xcf is a file I had created in an earlier version of Gimp
>  * is the file I re-saved.
>  * dimension.png contains all of the binary differences between the
>two.  The file is 640x480 (which in hex is 0x0280 by 0x01E0).

I can reproduce the problem loading "goinonboat2.xcf". But I can load
"goinonboat.xcf" without a problem, then save it again and the result
seems to be just fine.

Are you using any unusual compiler settings? Since you are using Gentoo,
we are likely going to attempt to blame you for this problem. So you
better try to convince me that your compiler settings are sane...


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] bugzilla spamming gimp users ?

2007-11-07 Thread Sven Neumann
Hi,

On Tue, 2007-11-06 at 17:51 +0100, olive wrote:

> I was away for 5 days and have 20+ messages from gimp buzilla in my 
> inbox. I am in the CC field of new bugs... why ?
> I noticed that more than half of the bugzilla messages I received result 
> from 2 other people removing themselves from the CC list, so we are at 
> least three receiving undesired messages from bugzilla when new bugs are 
> opened.

We had a Bugzilla user who filed a couple of enhancement requests and
for whatever reason included a large list of email address in the Cc:
fields. If you are annoyed, please send him a mail and ask him to stop
this.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] trace script-fu commands while using GUI

2007-11-07 Thread David Hodson
Juergen Weber wrote:

> As I understand the page, DBP offers a fixed set of processing option
> whereas a script recorder should apply any operation on a set of
> images, e.g. apply "Converting Color Images to B&W using Channel Mixer
> in The GIMP" (http://www.gimpguru.org/Tutorials/ChannelMixer/) to lots
> of images.

Yes, that's right. However, you did specifically mention conversion to 
B&W, sharpening, and resizing; and trying out the manipulations on a 
test image before applying them to the batch. DBP does all of those.

As Kevin pointed out, it's not currently possible to record an arbitrary 
set of commands given to Gimp. DBP tries to provide some of the most 
common operations.

-- 
David Hodson  --  this night wounds time
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user