This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > May 2007 > Scripting SmartPhotoFix





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 Scripting SmartPhotoFix
Orsmab

2007-05-07, 3:17 am

Is there a way to pass parameters to SmartPhotoFix? It seems that the
suggested settings will always override the parameters passed in. Is there
a way to turn the suggestion feature off?

Thanks,

Orsmab


Orsmab

2007-05-07, 3:17 am

I should have mentioned that this is for PSP X

Thanks,
Orsmab

"Orsmab" <orsmab@smabbage.com> wrote in message news:463d7e2a$1_3@cnews...
> Is there a way to pass parameters to SmartPhotoFix? It seems that the
> suggested settings will always override the parameters passed in. Is
> there a way to turn the suggestion feature off?
>
> Thanks,
>
> Orsmab
>



Spandex Rutabaga

2007-05-07, 6:20 am

Orsmab wrote:
>
> Is there a way to pass parameters to SmartPhotoFix? It seems that the
> suggested settings will always override the parameters passed in.


This is the way it is designed. The point of Smart Photo Fix
is that at least some of it adapts to the image content. If
you want to apply the same change to every image irrespective
of content try something like the Curves filter. That's pretty
much all that Smart Photo Fix does (except for the optional
sharpening).

> Is there
> a way to turn the suggestion feature off?


Apparently not. At least nobody has found a way to do it on the
occasions this has been asked before.
Tadjio

2007-05-07, 6:20 pm

"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message news:463ED3C0.51627A86@agabatur.xednaps...
> Orsmab wrote:
>
> This is the way it is designed. The point of Smart Photo Fix
> is that at least some of it adapts to the image content. If
> you want to apply the same change to every image irrespective
> of content try something like the Curves filter. That's pretty
> much all that Smart Photo Fix does (except for the optional sharpening).




I think that SPF is doing quite a lot, even if it may not be producing the result one might want.

Attached are 3 screen dumps of the dialog:
firstly the 'simple' form, showing that it adjusts the 'Brightness' Overall/Shadows/Highlights
plus the 'Saturation' and the 'Focus'.

then the 'advanced' form, showing the 'Color Balance' Black&White settings
and the original Histogram

and finally the same with the Before and After panes, showing the Black&White points,
together with the resultant Histogram in red.


I find the Saturation unhelpful, and usually turn it off (zero).
I compared the same photo with One Step Photo Fix and prefer OSPF in this case.
This was an extreme example with a lot of contrast.
In practice I don't use SPF anymore, preferring Curves and Levels.

As Spandex says, it is not possible to pass parameters to SPF - it does its own thing!

Tadjio

Spandex Rutabaga

2007-05-07, 6:20 pm

Tadjio wrote:
>
> "Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message news:463ED3C0.51627A86@agabatur.xednaps...


>
> I think that SPF is doing quite a lot, even if it may not be producing the result one might want.
>
> Attached are 3 screen dumps of the dialog:
> firstly the 'simple' form, showing that it adjusts the 'Brightness' Overall/Shadows/Highlights
> plus the 'Saturation' and the 'Focus'.


Focus is a sharpening operation involving multiple pixels. The
rest is a point operation done with tone curves. The automatic
"suggested setting" stuff comes from applying rules similar to
some of those I described in the discussion about fun with
histograms.

> then the 'advanced' form, showing the 'Color Balance' Black&White settings
> and the original Histogram


Color balance is done with tone curves.

> and finally the same with the Before and After panes, showing the Black&White points,


Black and white points help define a tone curve.

> together with the resultant Histogram in red.
>
> I find the Saturation unhelpful, and usually turn it off (zero).


Saturation is done with a tone curve subject to mapping the
colors to the gamut of the color space being used.

> As Spandex says, it is not possible to pass parameters to SPF - it does its own thing!


And, as Spandex said, everything bar the "focus" can be done
with Curves. From your screen shots the SPF filter seems to allow
saving some type of preset (even though it doesn't appear to
use the last used preset in a script). However, you could open
the preset in Notepad to see if what is recorded there gives you
a clue to constructing the equivalent Curves setting. (It depends
in part on whether the programmers bothered to implement presets
properly in SPF or not.)
Tadjio

2007-05-07, 6:20 pm

"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message news:463F3FBB.94F78F18@agabatur.xednaps...
>
> And, as Spandex said, everything bar the "focus" can be done with Curves.
> From your screen shots the SPF filter seems to allow
> saving some type of preset (even though it doesn't appear to
> use the last used preset in a script). However, you could open
> the preset in Notepad to see if what is recorded there gives you
> a clue to constructing the equivalent Curves setting. (It depends
> in part on whether the programmers bothered to implement presets
> properly in SPF or not.)



What a coincidence: a year ago today I saved just such a SPF Preset!!!

I have attached it, together with the drop-down list of presets and the effect on my image.
Can you explain the 'UseGreyBalance': True, 'GreyBalanceSampleList'...?

Over to you, Spandex, to devise a usable Script???

Tadjio

Tadjio

2007-05-07, 6:20 pm

"Tadjio" <Tadjio@PSP.uk> wrote in message news:463dfa65_2@cnews...
> "Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message news:463F3FBB.94F78F18@agabatur.xednaps...
>
>
> What a coincidence: a year ago today I saved just such a SPF Preset!!!
>
> I have attached it, together with the drop-down list of presets and the effect on my image.
> Can you explain the 'UseGreyBalance': True, 'GreyBalanceSampleList'...?
>
> Over to you, Spandex, to devise a usable Script???
>
> Tadjio



PS I just checked:
"Default" sets all the settings to Zero (no adjustment)
"Last Used" resets the 'default' SPF settings ??????

Spandex Rutabaga

2007-05-07, 6:20 pm

Tadjio wrote:
>
> "Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message news:463F3FBB.94F78F18@agabatur.xednaps...
>
> What a coincidence: a year ago today I saved just such a SPF Preset!!!
>
> I have attached it, together with the drop-down list of presets and the effect on my image.
> Can you explain the 'UseGreyBalance': True, 'GreyBalanceSampleList'...?


I think the filter collects color values from the image at
various lightness levels that it thinks should be neutral grey
(i.e. be achromatic, have no saturation). Alternatively you can
specify these colors as pixel locations in advanced mode. The
filter then uses this list to force these values to grey and
so color balance the image. Apparently up to 20 such samples
can be defined.

> Over to you, Spandex, to devise a usable Script???


It's useless for deriving a Curves setting because the preset
doesn't store tone curves, only parameters that are inputs for
some black box that manufactures and applies tone curves. For
the original poster it would be simpler just to apply the Curves
filter to his image once, spending as much time over tweaking
it as is necessary to get the desired result. Then this setting
could be applied over and over to other images in a script. If
desired, a sharpening step of some flavor could be added to the
script too. I don't see much benefit of using SPF in a script
if you aren't going to use the automatically generated values.
Tadjio

2007-05-07, 6:20 pm

"Orsmab" <orsmab@smabbage.com> wrote in message news:463d7e2a$1_3@cnews...
> Is there a way to pass parameters to SmartPhotoFix?
> It seems that the suggested settings will always override the parameters passed in.
> Is there a way to turn the suggestion feature off?
>
> Thanks,
>
> Orsmab




Based on my and Spandex's investigation, the answer to your question is, yes.

The script I attached earlier shows how the parameters to SmartPhotoFix are held
so, subject to the "UseGreyBalance" stuff which I don't understand,
you could pass the other Parameters such as:
'BlackPoint': 1,
'WhitePoint': 100,
'Highlights': -20,
'Brightness': 40,
'Shadows': 40,
'Saturation': 20,
'Sharpness': 40

However, that is the literal answer to your question, to which I would be interested to hear your response.

The way to turn the suggestion feature off is to save a Preset Script with the 'Last Used' ie Zero settings.

Better to follow Spandex's advice and experiment with applying the Curves filter and then creating a script.

Tadjio

Orsmab

2007-05-08, 3:17 am

>
> Based on my and Spandex's investigation, the answer to your question is,
> yes.
>
> The script I attached earlier shows how the parameters to SmartPhotoFix
> are held
> so, subject to the "UseGreyBalance" stuff which I don't understand,
> you could pass the other Parameters such as:
> 'BlackPoint': 1, 'WhitePoint': 100, 'Highlights': -20,
> 'Brightness': 40, 'Shadows': 40, 'Saturation': 20, 'Sharpness': 40
>
> However, that is the literal answer to your question, to which I would be
> interested to hear your response.


Basically what I was attempting was to write a script that would take the
suggested settings from SPF and modify them somewhat. Then I would reapply
those modified settings (using SPF again). For most of the images I have
been doing this exact thing manually and it seems to give me the quality
that I want. However it is tedious opening up the SPF dialog for every
image and doing adjustments to the settings and closing it again. Also
something interesting to note is that the settings for BlackPoint and
WhitePoint are misreported in the dialog box (at least in PSPX). You can
experiment yourself. You will not get the same histogram if you input the
numbers manually as you get from the suggested settings. This is backed up
by extracting these values via the script interface.

>
> The way to turn the suggestion feature off is to save a Preset Script with
> the 'Last Used' ie Zero settings.


I'm not sure what you mean here. Are you saying that if I make the Last
Used Preset Script all zeros then the suggestion feature will not override
them?

>
> Better to follow Spandex's advice and experiment with applying the Curves
> filter and then creating a script.


Unfortunately these batches of photos would not necessarily look good with
the same curves. I could try to take the info from SPF and formulate it
into some type of curves I guess. Or perhaps route it into separate tools.

Anyway, thanks everyone for the help. I can't believe the response.

-Orsmab


Spandex Rutabaga

2007-05-08, 6:18 pm

Orsmab wrote:

> Basically what I was attempting was to write a script that would take the
> suggested settings from SPF and modify them somewhat. Then I would reapply
> those modified settings (using SPF again).


Ah, this explains a lot. The issue is that you want to bias the
automatically generated correction because what you get is not
what you want. In other words, the adjustment may be in the right
direction but is either too little or too much. In reality to
avoid accumulation of errors you would want to apply a biased
correction just once, instead of applying SPF twice, first at
defaults and then a second time to apply your chosen bias.

I can't think of a way to do that but you might instead use the
old OneStepPhotoFix script or its component filters. (Corel has
hidden them under Unused Commands but they are still there.) The
benefit of these filters - Automatic Color Balance, Automatic
Contrast Enhancement, Automatic Saturation Enhancement - is that,
while they are automatic and apply settings that depend on the
specific content of each image, the result can be biased to your
taste. The general recipe for using these and other filters is:
http://campratty.com/2photos/ppages/p01autotips.html. Be warned
that Corel has changed the Clarify filter and it may not produce
the same results as before (or even useful results in some cases).
From the items discussed, you can probably skip the Edge Preserving
Smooth and you should try High Pass Sharpen in place of Unsharp
Mask. The recipe should allow you to record your own script.
Orsmab

2007-05-09, 6:17 am

> Ah, this explains a lot. The issue is that you want to bias the
> automatically generated correction because what you get is not
> what you want. In other words, the adjustment may be in the right
> direction but is either too little or too much. In reality to
> avoid accumulation of errors you would want to apply a biased
> correction just once, instead of applying SPF twice, first at
> defaults and then a second time to apply your chosen bias.
>


Actually I was running the SPF then grabbing the tool data and undoing the
SPF. This would give me the settings that the suggestions had made without
modifying the image. Now if I could just adjust and reapply those
settings...

Thanks though!


Spandex Rutabaga

2007-05-09, 6:21 pm

Orsmab wrote:
>
>
> Actually I was running the SPF then grabbing the tool data and undoing the
> SPF. This would give me the settings that the suggestions had made without
> modifying the image. Now if I could just adjust and reapply those
> settings...


I'm afraid you can't. It would have been helpful if you had
described all this accurately at the outset instead of being
prompted for it over three posts :) Try my other suggestion.
You might like it.
Sponsored Links


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