Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

One-Step-Photo-Fix Script in Interactive Mode (with DCNR alternative)
 

GregGatts




quote this post edit post

IP Loged report this post

Old Post  09-24-04 - 05:22 PM  
I noticed some discussion on the OSPF (One-Step Photo Fix) script, those tha
t
like it, those that don't. And sometimes Jasc's own defaults fail miserably.
 Not
many people like to get into the inner-workings and edit their own scripts, 
I
thought I'd try to help out those people.

Below is the OSPF script with edits to make it interactive so you can see wh
at
it is doing at each step and adjust them manually if need be. If you don't l
ike
it doing anything at one step just hit cancel, then agree to run the rest of
 the
script when the alert pops up. I also changed sharpen to unsharp-mask. When 
it
opens up the adjustment windows check to make sure that you like the default
settings that I embedded in the script. If not, edit the script to make it i
nto
your favorite defaults for each adjustment made. Now that you have the DCNR
(Digital Camera Noise Removal) filter in PSP9 you might want to replace the
edge-preserving-smooth with that, if you have some favorite settings that wo
rk
the best with the majority of your photos. An example of DCNR script that yo
u
could inside of the OSPF script is already included here below the new scrip
t.

(The easiest way I found to add modules for scripts, is to just record one s
hort
script using your favorite tool and settings for it then save it. Copy those
results into the script of your choice (but edit out any position settings a
nd
constants it might record). Then copy and paste that section into the script
 of
your choice.)

Reasons I changed some of default OSPF settings: I found that the "remove co
lor
cast" option in auto-color-balance would often destroy a sunset or overcast
feeling that I wanted to retain in a photo, or other images with a strong an
d
important ambient light source. So I turned that off, it ruined things more
times than fixing things. Since I do a lot of nature photography I didn't ca
re
for the skin-tone preservation in auto-saturation I turned off that option t
oo.
Your needs may vary, edit accordingly.

Those not familiar with hand-editing scripts, just change the "...Boolean.fa
lse"
to "...Boolean.true" for those setting options that you'd like to toggle bac
k
on.

Just copy and paste the below script into any text editor and save it under 
the
name of something like "OSPF_Interactive.PspScript" and put it in your
scripts-restricted or scripts-trusted folder

------copy from below this line-------
# This script provides "one-step" photo enhancement by running the
# following commands in order: Automatic Color Balance, Automatic
# Contrast Enhancement, Clarify, Automatic Saturation Enhancement,
# Edge Preserving Smooth and Un-Sharp-Mask.

def ScriptProperties():
return {
'Description': 'One-Step Photo Correction',
'Host': 'Paint Shop Pro 8',
'Host Version': '8.00'
}

# Get the image information for the current image

def Do(Environment):
App.Do( Environment, 'EnableOptimizedScriptUndo' )

# we need a document for this to work
if JascUtils.RequireADoc( Environment ) == App.Constants.Boolean.false:
return

# make the image true color if it is not already there
JascUtils.PromoteToTrueColor( Environment, App.TargetDocument )

# a number of operations are done differently on greyscale - capture that st
ate
GreyScale = JascUtils.IsGreyScale( Environment, App.TargetDocument )

# Color balance the image if it is not greyscale

if not GreyScale:
App.Do( Environment, 'AutoColorBalance', {
'RemoveColorCast': App.Constants.Boolean.false,
'Strength': 30,
'Temperature': 6500,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

# Enhance the contrast

App.Do( Environment, 'AutoContrastEnhancement', {
'Appearance': App.Constants.Appearance.Natural,
'Bias': App.Constants.ContrastBias.Neutral,
'Strength': App.Constants.ContrastStrength.Normal,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

# Enhance the saturation if the image is not greyscale

if not GreyScale:
App.Do( Environment, 'AutoSaturationEnhancement', {
'Bias': App.Constants.SaturationBias.Normal,
'Skintones': App.Constants.Boolean.false,
'Strength': App.Constants.SaturationStrength.Normal,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

# Smooth the image while preserving edge information

App.Do( Environment, 'EdgePreservingSmooth', {
'SmoothingFactor': 2,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

# Unsharp Mask
App.Do( Environment, 'UnsharpMask', {
'Clipping': 2,
'Radius': 1.66,
'Strength': 65,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'PreviewVisible': App.Constants.Boolean.true,
'AutoProof': App.Constants.Boolean.false,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

------end script--------------------------------


Here's an example of a noise removal script with some okay settings for PSP 
v9.0
that you could use to replace the edge-preserving-smooth filter in the above
script. Just delete the "Edge Preserving Smooth" section in the above script
 and
copy/insert this section in the same place:



# Digital Camera Noise Removal
App.Do( Environment, 'DigitalCameraNoiseRemoval', {
'SmallDetails': 30,
'MediumDetails': 30,
'LargeDetails': 30,
'Blending': 45,
'Sharpening': 1,
'LockDetailSettings': True,
'Hue': 39,
'Range': 70,
'MinimalLuminance': 4,
'MaximalLuminance': 255,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((9,0,0),1)
}
})




Post Follow-Up to this message ]
Re: One-Step-Photo-Fix Script in Interactive Mode (with DCNR alternative)
 

Mike Williams




quote this post edit post

IP Loged report this post

Old Post  09-25-04 - 12:18 AM  
Wasn't it GregGatts who wrote:
>I noticed some discussion on the OSPF (One-Step Photo Fix) script, those th
at
>like it, those that don't. And sometimes Jasc's own defaults fail miserably
. Not
>many people like to get into the inner-workings and edit their own scripts,
 I
>thought I'd try to help out those people.

I found that I had to add the following two lines to the start of the
script to get it to work (I'm using PSP 8.10)

from JascApp import *
import JascUtils


Personally I run several modified versions of One-Step Photo Fix without
interactivity. I find that the Jasc defaults for most of the operations
work together well, but the result can often be way too strong. So what
I do is get the script to duplicate the layer and apply the changes to
the new layer. When the effect is too strong, I F8 the layer palette and
reduce the opacity value of the new layer. This goes after the greyscale
test, before any of the actual enhancements get applied.

App.Do( Environment, 'LayerDuplicate', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})

I also remove the Automatic Colour Balance from all my modified copies
of OSPF, because I often want to have images that have an overall colour
tone to them.

--
Mike Williams
Gentleman of Leisure


Post Follow-Up to this message ]
Re: One-Step-Photo-Fix Script in Interactive Mode (with DCNR alternative)
 

GregGatts




quote this post edit post

IP Loged report this post

Old Post  09-25-04 - 04:21 AM  
Ah, thanks for catching that. It happened when I was editing out a bunch of
juvenile ego-crap from the original script before posting it. In my haste I 
left
out those 2 lines.



On Fri, 24 Sep 2004 13:35:34 +0100, Mike Williams <nospam@econym.demon.co.uk
>
wrote:

>Wasn't it GregGatts who wrote: 
>
>I found that I had to add the following two lines to the start of the
>script to get it to work (I'm using PSP 8.10)
>
>from JascApp import *
>import JascUtils
>
>
>Personally I run several modified versions of One-Step Photo Fix without
>interactivity. I find that the Jasc defaults for most of the operations
>work together well, but the result can often be way too strong. So what
>I do is get the script to duplicate the layer and apply the changes to
>the new layer. When the effect is too strong, I F8 the layer palette and
>reduce the opacity value of the new layer. This goes after the greyscale
>test, before any of the actual enhancements get applied.
>
>    App.Do( Environment, 'LayerDuplicate', {
>            'GeneralSettings': {
>                'ExecutionMode': App.Constants.ExecutionMode.Silent,
>                'AutoActionMode': App.Constants.AutoActionMode.Match
>                }
>            })
>
>I also remove the Automatic Colour Balance from all my modified copies
>of OSPF, because I often want to have images that have an overall colour
>tone to them.



Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 05:34 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Paint Shop Pro support archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top