[Gimp-user] how / when to use gimp-image-delete

2012-09-19 Thread Gary Aitken
When processing a series of files in script-fu,
I'm trying to do the following:

for each file name:
  Create an image by reading it in.
(set! orgImg (car (file-ufraw-load ...
  Create another image by duplicating the input image and manipulating it.
(set! newImg (car (gimp-image-duplicate orgImg)))
(gimp-image-scale newImg wid ht)
(plug-in-unsharp-mask RUN-NONINTERACTIVE newImg newImg ...
  Write the new image out.
(file-jpeg-save ... newImg ...
  Since I'm done with the newly created image, I did a
(gimp-image-delete newImg)

Continuing on, 
if I try to re-use that variable to create another image
from the original image
and try to manipulate it, I get an error after a bit:

(set! newImg (car (gimp-image-duplicate orgImg))); doesn't complain
(gimp-image-scale newImg wid ht) ; doesn't complain
(plug-in-unsharp-mask RUN-NONINTERACTIVE newImg newImg ...
  Error: Procedure execution of plug-in-unsharp-mask failed on invalid input 
arguments: Procedure 'plug-in-unsharp-mask' has been called with an invalid ID 
for argument 'drawable'. Most likely a plug-in is trying to work on a layer 
that doesn't exist any longer. 

If I comment out the 
  gimp-image-delete
it works fine.

Can someone explain to me what is going on?
(Using gimp 2.6)

Thanks,

Gary
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] procedure overloading in scheme / script-fu

2012-09-19 Thread paynekj
Can you point me to the scheme manual that talks about overloading please.

As you are talking about variable numbers of arguments, this article seems to 
explain how it works:
http://www.math.grin.edu/~stone/courses/scheme/readings/variable-arity.xhtml

And in your example, by replacing foo2 with foo you end up with a second 
definition of foo which replaces the first, and then calls itself recursively 
when used - hence your infinite loop.

-- 
paynekj (via gimpusers.com)
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] procedure overloading in scheme / script-fu

2012-09-19 Thread Kevin Cozens

On 12-09-18 06:42 PM, Gary Aitken wrote:

I assumed from the scheme manual that procedure-overloading
(in the form of different numbers of arguments) was permitted,
since, for example, there are two versions of string-number.


Scheme is not an OOP language so it does not support procedure overloading. 
If you look closely, you will see that string-number and number-string can 
take an optional parameter, a radix to use during the conversion. The 
optional radix parameter is not currently supported for either 
string-number or number-string.


Code to add support for the radix was supplied to the TinyScheme project and 
is currently being reviewed so radix support may be added soon to Script-Fu.



If you take the following code and run it in the script-fu console, it works;
but replacing all occurrances of foo2 with foo
gets into an infinite loop (I guess; it never returns, in any case).


If you changed all foo2 to foo, then foo continually calls itself and the 
console will appear to hang.


--
Cheers!

Kevin.

http://www.ve3syb.ca/   |Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!
#include disclaimer/favourite | --Chris Hardwick
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] script-fu constants

2012-09-19 Thread Kevin Cozens

On 12-09-18 09:37 PM, Gary Aitken wrote:

Can someone point me to a list of constants usable in script-fu?
Things like RUN-INTERACTIVE, etc.


I don't have a complete list but you can find some of the lesser known 
constants in my wiki at http://localhost/wiki/doku.php?id=software:sf:start


I've just added a note to my long ToDo list stating I should update the 
information I have about Script-Fu.


--
Cheers!

Kevin.

http://www.ve3syb.ca/   |Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!
#include disclaimer/favourite | --Chris Hardwick
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] How to draw with pressure dependend brush size

2012-09-19 Thread Richard Gitschlag


 Date: Tue, 18 Sep 2012 21:02:56 +0200
 From: scl.gp...@gmail.com
 To: gimp-user-list@gnome.org
 Subject: [Gimp-user] How to draw with pressure dependend brush size
 
 BTW is there a need to ship these Paint dynamics settings with GIMP?
 
 Kind regards,
 
 Sven
 
 [1] https://bugzilla.gnome.org/show_bug.cgi?id=682351
 [2] 
 https://mail.gnome.org/archives/gimp-user-list/2012-September/msg00212.html
 ___
 gimp-user-list mailing list
 gimp-user-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gimp-user-list

I thought a straight size-pressure mapping was one of the defaults shipped with 
GIMP?  (Apparently it's not!)

Size/opacity and hardness/opacity are two of THE simplest, most basic tablet 
mappings you can have; they should seriously be part of the default package.  
Why we should have one for inverted size/pressure but not straight 
size/pressure ... that's snafu to me.

-- Stratadrake
strata_ran...@hotmail.com

Numbers may not lie, but neither do they tell the whole truth.

  ___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] gimp 2.8 export, after save as keeps old files name

2012-09-19 Thread Richard Gitschlag


 Date: Wed, 19 Sep 2012 03:48:15 +0200
 From: for...@gimpusers.com
 To: gimp-user-list@gnome.org
 CC: t...@gimpusers.com
 Subject: [Gimp-user] gimp 2.8 export, after save as keeps old files name
 

 Hello, i have a question, when i open a new file and export it with 
ctrl+e, the gimp 2.8 exports the file with the current file name as 
expected but after i save  (with save as)  file with a new file name, 
ctrl+e exports the new file with the old file name, and i think it has 
to be changed, because it is an absolutely new file and it is senseless 
to keep the old file name for exporting the new file... 
 Is this a bug or did developers do this feature intentionally?
 
 -- 
 realbezo (via gimpusers.com)
 ___
 gimp-user-list mailing list
 gimp-user-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gimp-user-list

More specifically:

1 - Open any convenient (non XCF) image file.  E.g. filename.png
2 - Access the Export command.  The default filename shown is filename.png 
(e.g. whatever the source filename was).
3 - Access the Save As command.  The default filename shown here is 
filename.xcf.
4 - Save the image as an XCF but with a different filename, e.g. 
filename.different.xcf .
5 - Access the Export command again.  The default filename is now 
filename.different.png, not filename.png.

Why is that?

-- Stratadrake
strata_ran...@hotmail.com

Numbers may not lie, but neither do they tell the whole truth.


  ___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] How to draw with pressure dependend brush size

2012-09-19 Thread scl

I thought a straight size-pressure mapping was one of the defaults
shipped with GIMP?  (Apparently it's not!)

Size/opacity and hardness/opacity are two of THE simplest, most basic
tablet mappings you can have; they should seriously be part of the
default package.  Why we should have one for inverted size/pressure but
not straight size/pressure ... that's snafu to me.


Thanks, Richard, for your reply.
I was wondering whether this is missing for other users and appearantly 
it is. Let's not start arguing like those silly save ./. export threads ;-)


Kind regards,

Sven
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] script-fu constants

2012-09-19 Thread Alec Burgess
Hi Kevin: I think something is wrong with the URL you posted. 
...//localhost/ .. looks peculiar ;-)


Regards ... Alec   (buralex@gmail  WinLiveMess - alec.m.burgess@skype)



On 2012-09-19 11:11, Kevin Cozens wrote:

On 12-09-18 09:37 PM, Gary Aitken wrote:

Can someone point me to a list of constants usable in script-fu?
Things like RUN-INTERACTIVE, etc.


I don't have a complete list but you can find some of the lesser known
constants in my wiki at
http://localhost/wiki/doku.php?id=software:sf:start

I've just added a note to my long ToDo list stating I should update
the information I have about Script-Fu.

___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] turning off thumbnail in jpeg saves; deleting a thumbnail?

2012-09-19 Thread Gary Aitken
Is there any way to turn off the jpeg thumbnail 
when writing out a file using
  file-jpeg-save?  
Otherwise, a small web image can be large when generated by copying from an
existing image which has a thumbnail.
In my case, the source image is coming in via ufraw.

It's not clear to me whether the thumbnail I'm getting is created by GIMP
or sent to it from ufraw.
If it's being created by gimp,
is there a way to delete the thumbnail from an image? 

Or does one have to create a new empty image
and copy only the active layer from the existing image to it?
Will that even solve the problem?
Problem with creating a new image is all the exif data, etc, is lost.

Thanks,

Gary
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] script-fu constants

2012-09-19 Thread Kevin Cozens

On 12-09-19 06:35 PM, Alec Burgess wrote:

Hi Kevin: I think something is wrong with the URL you posted.


I copied and pasted from the wrong browser window.

http://www.ve3syb.ca/wiki/doku.php?id=software:sf:start

--
Cheers!

Kevin.

http://www.ve3syb.ca/   |Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!
#include disclaimer/favourite | --Chris Hardwick
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] what's with the auto-insert of run-mode as the first arg for script-fu methods?

2012-09-19 Thread Gary Aitken
Using gimp 2.6
I originally defined my script-fu procedure as

(define (my-proc fileExpr)
  ...
)

and registered it using:

(script-fu-register
  my-proc
  ...
   ; image type the script works 
on
  SF-STRING   FileNameExpression 
)

But the procedure browser lists it as taking two args,
the first of which is 
  run-mode  INT32  Interactive, non-interactive

In order to get it to work, I had to change the definition to:

(define (my-proc runMode fileExpr)
  ...
)

but left the registration as is (without run-mode).

What's the deal with the auto-insert of run-mode in the procedure browser help,
and do I have to define it as an arg in the registration?
If so, what is its type?  
(I tried SF-RUN-MODE and it didn't like that)
If I leave it as is and try to use it from the menu 
instead of the script-fu console,
There's no place to enter the run-mode in the dialog which pops up,
and it feeds the string first arg in as the run-mode and barfs.

totally confused, looking for some enlightment...
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list