Re: [Gimp-user] Gimp update and script-fu doesn't work

2008-12-12 Thread a...@storm
Chris Mohler said the following on 2008-12-09 19:25:

  Yes - there have been changes - if you post your script-fu here,
  someone might help you update it.
 
Okay, pasted script lost text formating in e-mail.
So I put it here:
http://ak-studio.com.pl/adam/gimp/FinishJob.scm
and here:
http://ak-studio.com.pl/adam/gimp/FinishJob.txt

I need some help. First off all - how to modify this script to run 
properly in new enviroment (error msg: unbound variable...). I 
suppose the probblem is in set! operator in few lines on beginning 
of script.
When script was working (2.2.10) it saved me lot of time

Another question is How to save opened jpg image at the end of 
script. I've tried to do it by myself, but after one month I gived 
up. Only thing I can do is read file name. Nothing more

My everyday work is:
1) double click on existing .jpg file
2) make some retouching on picture, fix colors, geometry etc
3) when image is ready I would like script to do:
  a) scale image to 400 pxl height (perfect for target www)
  b) sharpen image (factor 40 - is great for my cameras)
  c) flatten image (than is ready for save .jpg)
  d) save file, exactly save, not save As - raw copy is still saved
 on camera flash card
  e) close image

If somebody can help me I will be grateful to

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


Re: [Gimp-user] Gimp update and script-fu doesn't work

2008-12-12 Thread saulgoode
Quoting a...@storm a...@storm.pl:

 Chris Mohler said the following on 2008-12-09 19:25:

   Yes - there have been changes - if you post your script-fu here,
   someone might help you update it.
  
 Okay, pasted script lost text formating in e-mail.
 So I put it here:
 http://ak-studio.com.pl/adam/gimp/FinishJob.scm
 and here:
 http://ak-studio.com.pl/adam/gimp/FinishJob.txt

 I need some help. First off all - how to modify this script to run
 properly in new enviroment (error msg: unbound variable...). I
 suppose the probblem is in set! operator in few lines on beginning
 of script.

Updated script:  
http://flashingtwelve.brickfilms.com/GIMP/Scripts/Temp/Reworked-FinishJob.scm

 Another question is How to save opened jpg image at the end of
 script. I've tried to do it by myself, but after one month I gived
 up. Only thing I can do is read file name. Nothing more

I believe the most significant problem you were experiencing is that  
the action of flattening your image results in a newly created layer  
and all the original layers disappear; i.e., the original Drawable  
value that you were using in your 'file-jpeg-save' call was no longer  
valid after the script flattened the image.

 My everyday work is:
 1) double click on existing .jpg file
 2) make some retouching on picture, fix colors, geometry etc
 3) when image is ready I would like script to do:
   a) scale image to 400 pxl height (perfect for target www)
   b) sharpen image (factor 40 - is great for my cameras)
   c) flatten image (than is ready for save .jpg)
   d) save file, exactly save, not save As - raw copy is still saved
  on camera flash card
   e) close image

It is not possible to perform step 3e) --  scripts can only close  
images which they themselves open or create. Images that are opened or  
created from the menus must be closed from the menus.

The updated script will result in the image being marked as saved, so  
that closing the image does not generate a warning about losing  
changes. I am not entirely comfortable about doing this because not  
ALL image changes are saved with the JPEG format and closing your  
image after running the script will result in the loss of some  
information -- e.g., any channels or paths you've created, as well as  
the degradation of the picture owing to JPEG's lossy compression.  
Nonetheless, given your work flow, it seems appropriate as long as you  
remain aware of this limitation. If you should prefer to still be  
warned about losing data then remove the line which calls  
'gimp-image-clean-all'.



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


Re: [Gimp-user] Gimp update and script-fu doesn't work

2008-12-12 Thread a...@storm
saulgo...@flashingtwelve.brickfilms.com said the following on 
2008-12-12 16:19:

 
 Updated script:  
 http://flashingtwelve.brickfilms.com/GIMP/Scripts/Temp/Reworked-FinishJob.scm

Great!!! It works perfect 4 me! Big thanks :)

 I believe the most significant problem you were experiencing is that  
 the action of flattening your image results in a newly created layer  
 and all the original layers disappear; i.e., the original Drawable  
 value that you were using in your 'file-jpeg-save' call was no longer  
 valid after the script flattened the image.

It is dificult to say.. I have seen syntax error, or... no action, 
but I believe U R right.

 It is not possible to perform step 3e) --  scripts can only close  
 images which they themselves open or create. Images that are opened or  
 created from the menus must be closed from the menus.

Lets say if it is impossible than I have to find a benefit... 
think... think... well, there is benefit:
I have undo working and if something is wrong with a picture (i.e 
to heavy sharpen) I can go step back and make all things manually.
Kind of final check out. In this point it will be better when 
displayed image is viewed 100% (1:1). It is one command... but I do 
not remember...

 The updated script will result in the image being marked as saved, so  
 that closing the image does not generate a warning about losing  
 changes. I am not entirely comfortable about doing this because not  
 ALL image changes are saved with the JPEG format and closing your  
 image after running the script will result in the loss of some  
 information -- e.g., any channels or paths you've created, as well as  
 the degradation of the picture owing to JPEG's lossy compression.  
 Nonetheless, given your work flow, it seems appropriate as long as you  
 remain aware of this limitation. If you should prefer to still be  
 warned about losing data then remove the line which calls  
 'gimp-image-clean-all'.

Your notes are very important, thank U. But I know the limitation of 
.jpg files. This way I make just for one puprpose: network preview 
of real estate, for example: 
http://www.burg.com.pl/mieszkanie/sprzedaz/59192/

For printed matters I can work one or two (or more) hours with each 
image and no script is necessary :)

One more time - thanks.

Adam.



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