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

Reply via email to