This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > November 2006 > Re: JPEGOptimizer directory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: JPEGOptimizer directory
Ammon Johnson

2006-11-19, 8:49 pm

SuzShook wrote:
> If you run that step silently, it will save the file to the directory listed
> in the FileName parameter of the command. If you want that to be the same
> as the directory from which the file came, you can extract that information
> from the file itself using the ReturnImageInfo:
>
> ImageInfo = App.Do( Environment, 'ReturnImageInfo')
>
> # JPEG Optimizer
> App.Do( Environment, 'JPEGOptimizer', {
> 'Format': App.Constants.JpegFormat.Standard,
> 'Compression': 10,
> 'FileName': ImageInfo [ 'FileName' ],
> 'BackgroundColor': (255,255,255),
> 'ChromaSubSampling':
> App.Constants.ChromaSubSampling.YCC_2x2_1x1_1x1,
> 'SaveExifData': App.Constants.Boolean.false,
> 'GeneralSettings': {
> 'ExecutionMode': App.Constants.ExecutionMode.Silent,
> 'AutoActionMode': App.Constants.AutoActionMode.Match
> }
> })
>
> This would do it, Dave - however, I don't think it can be done if you want
> to run that step interactively. Suz



Suz, you rock! Thanks for this excellent little piece of example code!

Enjoy!!
~~Ammon ;~>
SuzShook

2006-11-19, 8:49 pm

Ammon Johnson wrote:
> SuzShook wrote:
>
>
> Suz, you rock! Thanks for this excellent little piece of example
> code!
> Enjoy!!
> ~~Ammon ;~>


Glad to help, Ammon. Suz


Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews