Re: [Gimp-user] batch mode debugging

2007-09-10 Thread Milos Prudek

 (set! drawable (car (gimp-image-get-active-layer image)))

Yes! And it works. Thank you very much. This will save many hours of manual 
work.

Thank you for the debugging tip. It is quite discouraging when the computer 
tells you your program is wrong, and I am not going to tell you what is 
wrong with it, not even a small hint.

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


[Gimp-user] How to define Script-Fu widgets?

2007-09-10 Thread Milos Prudek
How are the various GUI widgets defined in Script-Fu?

For instance Script-Fu/Decor/Fuzzy border: 
- Border size GUI widget is a number with arrows. 
- Granularity GUI widget is a slider with arrows. 

I look at the fuzzyborder.scm file. These GUI widgets seem to be defined 
in (script-fu-register):

SF-ADJUSTMENT _Border size'(16 1 300 1 10 0 1)
SF-ADJUSTMENT _Granularity (1 is Low) '(4 1 16 0.25 5 2 0)

They are both SF-ADJUSTMENT, so why is the first GUI a number with arrows 
and the second is slider with arrows? And what do the numbers (16 1 300 1 
10 0 1) mean?

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


Re: [Gimp-user] How to define Script-Fu widgets?

2007-09-10 Thread Milos Prudek
 The last argument determines the widget type. The list of numbers
 corresponds to (respectively):

Wow. Thank you. Is this documented somewhere?

Should not it be published at http://www.gimp.org/tutorials/Basic_Scheme/ ?

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


[Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek
Hi,

I need to use GIMP batch mode. I managet to reproduce the tutorial at 
http://www.gimp.org/tutorials/Basic_Batch/ but my own attempts fail with a 
very unhelpful error message batch command: experienced an execution error.

I tried to intentionally damage the tutorial itself and I discovered that 
whatever syntax error I make, the error message is always the same: batch 
command: experienced an execution error.

Is there a way to get at least a line number where the error occured?

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


[Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek
This is pure madness. The following line works perfectly in GIMP if used in a 
simple script-fu for currently loaded image.

(script-fu-fuzzy-border image drawable '(255 255 255) 120 TRUE 9 FALSE 0 FALSE 
TRUE)

The very same line with an added RUN-NONINTERACTIVE parameter fails if used in 
a batch mode script picked from http://www.gimp.org/tutorials/Basic_Batch/. I 
know that the error is in that line script-fu-fuzzy-border, because if I 
remove the line, there are no errors. Here is the whole script, whose single 
purpose is to run script-fu-fuzzy-border over all jpg files in a directory:

  (define (xxx pattern)
  (let* ((filelist (cadr (file-glob pattern 1
(while (not (null? filelist))
   (let* ((filename (car filelist))
  (image (car (gimp-file-load RUN-NONINTERACTIVE
  filename filename)))
  (drawable (car (gimp-image-get-active-layer image

   (script-fu-fuzzy-border RUN-NONINTERACTIVE image drawable '(255 255 
255) 120 TRUE 9 FALSE 0 FALSE TRUE)


 (gimp-file-save RUN-NONINTERACTIVE
 image drawable filename filename)
 (gimp-image-delete image))
   (set! filelist (cdr filelist)

Please help me.

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


Re: [Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek
I simplified the above problem into the following script:

 (define (fuzzy-border-single filename)
   (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
  (drawable (car (gimp-image-get-active-layer image
  (script-fu-fuzzy-border RUN-NONINTERACTIVE image drawable '(255 255 
255) 120 TRUE 9 FALSE 0 FALSE TRUE)
 (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
 (gimp-image-delete image)))

This script should be able to run with this command: 

gimp -i -b '(fuzzy-border-single foo.jpg)' '(gimp-quit 0)'

But it produces only this:
batch command: experienced an execution error.

And it operates correctly if the script-fu-fuzzy-border line is replaced with   

(plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable 1 1 1)


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


Re: [Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek

 RUN-NONINTERACTIVE is not a valid parameter for 'script-fu-fuzzy-border'.

Your answer is perplexing. 

A) Neither unsharp-mask.scm nor fuzzyborder.scm have run_mode in their 
parameter list. 

B) script_fu_unsharp_mask AND plug_in_unsharp_mask AND script_fu_fuzzy_border 
do have run_mode in their parameter list in the Procedure Browser.

How am I supposed to discover that RUN-NONINTERACTIVE is not a valid parameter 
for 'script-fu-fuzzy-border' if run_mode is in the parameter list in the 
Procedure Browser, and furthermore plug_in_unsharp_mask does indeed work with 
RUN-NONINTERACTIVE ?

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


Re: [Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek
On Sunday 09 of September 2007 14:53:52 
[EMAIL PROTECTED] wrote:
 RUN-NONINTERACTIVE is not a valid parameter for 'script-fu-fuzzy-border'.

You are right. Unfortunately when I remove RUN-NONINTERACTIVE, the script 
fails anyway, this time with this error message:

(jpeg:14957): LibGimp-CRITICAL **: gimp_drawable_get: assertion `width  0  
height  0  bpp  0' failed
/usr/lib/gimp/2.0/plug-ins/jpeg: fatal error: Segmentation fault

I wrote a simple Script-Fu script integrated into right-click context menu 
for an opened picture. And it works perfectly.

But the scripts I posted do not work. They should work in batch mode. Why do 
not they? The syntax of script-fu-fuzzy-border is exactly the same.

Here is the offending script again:

 (define (fuzzy-border-single filename)
   (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
  (drawable (car (gimp-image-get-active-layer image

 (script-fu-fuzzy-border image drawable '(255 255
255) 120 TRUE 9 FALSE 0 FALSE TRUE)

 (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
 (gimp-image-delete image)))

And it is called by this command:

gimp -i -b '(fuzzy-border-single foo.jpg)' '(gimp-quit 0)'


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


Re: [Gimp-user] batch mode debugging

2007-09-09 Thread Milos Prudek
 It is my understanding that ALL Script-fus are run non-interactively.

script-fu-fuzzy-border can run interactively. It is available in 
Right-click/Script-Fu/Decor/ menu in GIMP. It asks interactively for its 
parameters. Is it an interactive run?

 not have the same 'drawable' ID as before the flattening. If you do a
 second 'gimp-image-get-active layer' after flattening then you will be
 passing the proper 'drawable' ID to the save plug-in.

OK. I tried to implement your idea:

 (define (fuzzy-border-single filename)
   (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
  (drawable (car (gimp-image-get-active-layer image

 (script-fu-fuzzy-border image drawable '(255 255
255) 120 TRUE 9 FALSE 0 FALSE TRUE)
 (set! (drawable (car (gimp-image-get-active-layer image
 (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
 (gimp-image-delete image)))

But it outputs batch command: experienced an execution error.

I learned the basics of Scheme yesterday. Is this some kind of scope error? Am 
I changing a different drawable variable?

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


Re: [Gimp-user] Searching for python scripting tutorial

2007-06-16 Thread Milos Prudek
 A skeleton of a PyGimp plugin follows:

Thank you!


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


[Gimp-user] Searching for python scripting tutorial

2007-06-15 Thread Milos Prudek
Hi,

I would like to script two simple actions:

1)
- Add frame 20 white pixels, 
- Add frame 2 black pixels,
- Add frame 80 white pixels,
- Job finished

2) 
- add white blurred frame 110 pixels
- blur the border, grain 9, no added shadow
- Job finished

I would like to do it in Python. Where can I find API calls available in 
Python plugin?

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


[Gimp-user] User interface language in GIMP 2.3.13

2006-11-30 Thread Milos Prudek
I compiled GIMP 2.3.13. The User interface is in English, even though my 
enviro variables are set for Czech. What could be the problem?

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


Re: [Gimp-user] gimp not respecting locale

2005-11-24 Thread MIlos Prudek
On Wednesday 23 of November 2005 17:29, you wrote:
 env LC_ALL=en_US gimp

Yes, this show english interface.

When I run env LC_ALL=cs_CZ gimp, gimp should shoiw Czech interface, shouldn't 
it? But it does not. 

Curiously, gimp compiled from sources did not show this problem. Only gimp RPM 
included with my current distro, Mandriva 2006, shows this problem. Even 
though locale messages are installed in 

/usr/share/locale/cs/LC_MESSAGES/gimp20-libgimp.mo
/usr/share/locale/cs/LC_MESSAGES/gimp20-script-fu.mo
/usr/share/locale/cs/LC_MESSAGES/gimp20-std-plug-ins.mo
/usr/share/locale/cs/LC_MESSAGES/gimp20.mo

I guess you will now rebuke me for bringing a distro-specific issue to this 
list...

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


Re: [Gimp-user] gimp not respecting locale

2005-11-24 Thread MIlos Prudek

  When I run env LC_ALL=cs_CZ gimp, gimp should shoiw Czech interface,
  shouldn't it? But it does not.
 no rebuking.  when they make things easy for people they also make it
 very difficult to find out where it is broken.

OK.

I solved the problem by compiling gimp 2.2.9 from sources. 

Who knows what kind of Voodoo is Mandriva's gimp following. 

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


Re: [Gimp-user] preview stored in jpeg?

2004-11-21 Thread Milos Prudek
 Yes. GIMP 2.0 does keep the EXIF info w/o altering it. That EXIF info
 can contain a thumbnail image. If you edit the JPEG file with GIMP 2.0
 it will not change the thumbnail image.
Thanks for the info!
--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


[Gimp-user] preview stored in jpeg?

2004-11-20 Thread Milos Prudek
Can jpeg image created by Gimp contain a small preview of the image, 
different than the image itself, specifically an older version of the image?

I'm out of possible explanations: if you go to 
http://www.photoserver.cz/user.asp?IDENT=367 and look at the thumbnail 
image in the top left corner called s jeziskem, you'll see the bright 
window on the right. This is unprocessed image. It was never send to the 
photoserver.

When you click on the thumbnail you will see the full size image, 
cropped and processed.

How could the unprocessed image have been obtained by the webserver? I 
do not understand this. The unprocessed image has a totally different 
filename than the processed image... and more importantly, the upload 
dialog of the webserver does NOT allow an upload of a  thumbnail. You 
can only upload one image in the webserver's upload form, and it is of 
course the full size image, and the server is responsible for thumbnail 
generation.

--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


[Gimp-user] exif not saved

2004-08-15 Thread Milos Prudek
Gimp does not save EXIF data even though the setting says it should save it.
I use Save As... and the Save EXIF data checkbox is checked.
Is anyone else experiencing this? i want to verify it before I submit a 
bug report to Bugzilla.

Gimp 2.0.3 on Linux, compiled from sources, working perfectly in all 
other respects.

--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] exif not saved

2004-08-15 Thread Milos Prudek
Yes. I installed gimp 2.0.4 and the problem is gone. Thank you very much!
Known problem, fixed in 2.0.4.
--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


[Gimp-user] dreamy look

2004-08-11 Thread Milos Prudek
I want to achieve a certain effect. For lack of better description I'll 
call it a dreamy look.

I found a perfect, very short howto for Photoshop here:
http://www.photoserver.cz/tutorials_show.asp?ID=20
Description is in Czech, but it's easy to follow the howto thanks to 
numerous screenshots.

Now the problem: Gimp has exactly the same tools as used in this 
tutorial. The end result is quite disappointing though.

Basicaly the Gimp-processed image lost much detail in the grandma's hair 
and it looks much more out of focus than the Photoshop version.

How can I achieve this dreamy look in the Gimp?
--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] dreamy look

2004-08-11 Thread Milos Prudek
How can I achieve this dreamy look in the Gimp?

Also look here:
http://www.gimpguru.org/Tutorials/BlurOverlays/
Thanks, that's a cool resource.
--
Milos Prudek
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] dreamy look

2004-08-11 Thread Milos Prudek
I am guessing only but I'd say the tutorial forgets to mention that
the upper layer (the blurry one) needs to be set to Screen mode. I can
get a result that comes very close by following the tutorial and
changing the layer mode to Screen.
What can I say? That's exactly what was missing. Thank you very much!
--
Milos Prudek
_
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user