This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > November 2007 > Tri-tone Colors
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]
|
|
| Tim Vesper 2007-11-07, 10:17 pm |
| underprocessable | |
| Joëlle 2007-11-08, 6:20 am |
|
"Tim Vesper" <t2mouse@yahoo.com> wrote in message news:47327f3f_3@cnews...
> Here is a sample of using tri-tone colors to add a very different effect
> to a images. In this image I applied more than just a straight tri-tone
> effect as you can see, but the tri-tone effect really made the image look
> better.
>
> This script comes with 30 different color settings, which has, reds,
> oranges, yellows, sepia, blues, greens. With 5 different filter effects
> and a vintage border option. I'm looking for some opinions on what you
> think about my script here, I'm still new at this scripting stuff. This
> script will work with Paint Shop Pro XI and X2.
>
> Thanks
>
>
>
>
This is fun Tim, although a bit lengthy.
I did find it hard to remember which effect I had selected.
If you could simplify it a bit...
Something like 'select option 1 for adding a red tint with dark border'
'Select option 2 for adding sepia with a white border' that sort of thing.
Well done, I only assemble settings and save them as scripts, I couldn't
write a script to save my life!
:-)
Joëlle
| |
| Tim Vesper 2007-11-09, 3:18 am |
| If you run the script it will tell you in the layer palette what color
scheme you choosen when it's all done,
for examples; tri-tone 2 or tri- tone 13. Did you notice that.
Tim
| |
| Big Bad Dave 2007-11-09, 3:18 am |
| Tim Vesper wrote:
> If you run the script it will tell you in the layer palette what color
> scheme you choosen when it's all done,
> for examples; tri-tone 2 or tri- tone 13. Did you notice that.
>
> Tim
Hi Tim.
That's quite fun to play with.
Looking throught the script, there are a couple of things that you could do
to make it easier to follow. You may already know this, but others may not.
There are lots of section in there that say things link...
if ColorSetOption == 1:
LayerName = 'Tri Tone 1'
if ColorSetOption == 1:
TriColor1 = (229,210,209)
if ColorSetOption == 1:
TriColor2 = (238,204,221)
if ColorSetOption == 1:
TriColor3 = (220,195,227)
Python (the scripting language used by PSP) uses indentation to group lines,
so this could have been written as...
if ColorSetOption == 1:
LayerName = 'Tri Tone 1'
TriColor1 = (229,210,209)
TriColor2 = (238,204,221)
TriColor3 = (220,195,227)
All the lines indented from the if statement will be executed if the
condition is true.
Also, it helps if you separate out blocks of code into subroutines. For
example the lines which do Effect 1, Effect 2 etc, could be replaced with
something like...
if EffectOptions == 1:
DoEffect1(Environment)
elif EffectOptions == 2:
DoEffect2(Environment)
else:
print 'Invalid option'
Then, at the bottom of the file put the subroutines...
###################################
def DoEffect1(Environment):
App.Do( Environment, 'LayerProperties', {
'General': {
'Opacity': 95,
.... etc ....
###################################
def DoEffect2(Environment):
App.Do( Environment, 'LayerProperties', {
'General': {
'Opacity': 95,
.... etc ....
###################################
Obviously, it gets harder to separate out the bits for effects 4 and 5,
which are partially common and partially different.
The following links give some useful information about Python programming...
http://docs.python.org/tut/tut.html
http://pentangle.net/python/handbook/handbook.html
Dave
| |
| Tim Vesper 2007-11-09, 6:22 pm |
| Thanks for that, will look into it....
Tim
"Big Bad Dave" <dave@hotmail.com> wrote in message
news:47340a18$1_1@cnews...
> Tim Vesper wrote:
>
> Hi Tim.
>
> That's quite fun to play with.
> Looking throught the script, there are a couple of things that you could
> do to make it easier to follow. You may already know this, but others may
> not.
>
> There are lots of section in there that say things link...
>
> if ColorSetOption == 1:
> LayerName = 'Tri Tone 1'
> if ColorSetOption == 1:
> TriColor1 = (229,210,209)
> if ColorSetOption == 1:
> TriColor2 = (238,204,221)
> if ColorSetOption == 1:
> TriColor3 = (220,195,227)
>
> Python (the scripting language used by PSP) uses indentation to group
> lines, so this could have been written as...
>
> if ColorSetOption == 1:
> LayerName = 'Tri Tone 1'
> TriColor1 = (229,210,209)
> TriColor2 = (238,204,221)
> TriColor3 = (220,195,227)
>
> All the lines indented from the if statement will be executed if the
> condition is true.
>
> Also, it helps if you separate out blocks of code into subroutines. For
> example the lines which do Effect 1, Effect 2 etc, could be replaced with
> something like...
>
> if EffectOptions == 1:
> DoEffect1(Environment)
> elif EffectOptions == 2:
> DoEffect2(Environment)
> else:
> print 'Invalid option'
>
> Then, at the bottom of the file put the subroutines...
>
> ###################################
> def DoEffect1(Environment):
> App.Do( Environment, 'LayerProperties', {
> 'General': {
> 'Opacity': 95,
> .... etc ....
> ###################################
> def DoEffect2(Environment):
> App.Do( Environment, 'LayerProperties', {
> 'General': {
> 'Opacity': 95,
> .... etc ....
> ###################################
>
> Obviously, it gets harder to separate out the bits for effects 4 and 5,
> which are partially common and partially different.
>
> The following links give some useful information about Python
> programming...
>
> http://docs.python.org/tut/tut.html
> http://pentangle.net/python/handbook/handbook.html
>
> Dave
>
| |
|
| This script worked very nicely for me in PSP X.
Thank you, Doris2
doristwo@att.net
"Tim Vesper" <t2mouse@yahoo.com> wrote in message news:47327f3f_3@cnews...
> Here is a sample of using tri-tone colors to add a very different effect
> to a images. In this image I applied more than just a straight tri-tone
> effect as you can see, but the tri-tone effect really made the image look
> better.
>
> This script comes with 30 different color settings, which has, reds,
> oranges, yellows, sepia, blues, greens. With 5 different filter effects
> and a vintage border option. I'm looking for some opinions on what you
> think about my script here, I'm still new at this scripting stuff. This
> script will work with Paint Shop Pro XI and X2.
>
> Thanks
>
>
>
>
| |
| Tim Vesper 2007-11-12, 6:18 pm |
| I look at the links and I'm still having some problem this ideal of
creating subrouting blocks of information.... can someone point me to a
script has it used to learn from... I missing something.
I do understand the old programming stuff.
Goto (block title)
run information code
then return back from where the subroute was called
Even a simple input of 3 choices would help.
Tim
"Big Bad Dave" <dave@hotmail.com> wrote in message
news:47340a18$1_1@cnews...
> Tim Vesper wrote:
>
> Hi Tim.
>
> That's quite fun to play with.
> Looking throught the script, there are a couple of things that you could
> do to make it easier to follow. You may already know this, but others may
> not.
>
> There are lots of section in there that say things link...
>
> if ColorSetOption == 1:
> LayerName = 'Tri Tone 1'
> if ColorSetOption == 1:
> TriColor1 = (229,210,209)
> if ColorSetOption == 1:
> TriColor2 = (238,204,221)
> if ColorSetOption == 1:
> TriColor3 = (220,195,227)
>
> Python (the scripting language used by PSP) uses indentation to group
> lines, so this could have been written as...
>
> if ColorSetOption == 1:
> LayerName = 'Tri Tone 1'
> TriColor1 = (229,210,209)
> TriColor2 = (238,204,221)
> TriColor3 = (220,195,227)
>
> All the lines indented from the if statement will be executed if the
> condition is true.
>
> Also, it helps if you separate out blocks of code into subroutines. For
> example the lines which do Effect 1, Effect 2 etc, could be replaced with
> something like...
>
> if EffectOptions == 1:
> DoEffect1(Environment)
> elif EffectOptions == 2:
> DoEffect2(Environment)
> else:
> print 'Invalid option'
>
> Then, at the bottom of the file put the subroutines...
>
> ###################################
> def DoEffect1(Environment):
> App.Do( Environment, 'LayerProperties', {
> 'General': {
> 'Opacity': 95,
> .... etc ....
> ###################################
> def DoEffect2(Environment):
> App.Do( Environment, 'LayerProperties', {
> 'General': {
> 'Opacity': 95,
> .... etc ....
> ###################################
>
> Obviously, it gets harder to separate out the bits for effects 4 and 5,
> which are partially common and partially different.
>
> The following links give some useful information about Python
> programming...
>
> http://docs.python.org/tut/tut.html
> http://pentangle.net/python/handbook/handbook.html
>
> Dave
>
| |
| Spandex Rutabaga 2007-11-14, 3:17 am |
| Tim Vesper wrote:
>
> I look at the links and I'm still having some problem this ideal of
> creating subrouting blocks of information.... can someone point me to a
> script has it used to learn from... I missing something.
>
> I do understand the old programming stuff.
>
> Goto (block title)
> run information code
> then return back from where the subroute was called
>
> Even a simple input of 3 choices would help.
Take a look at Gary Barton's scripts here for use as a model:
http://pixelnook.home.comcast.net/
Look in the script for something that looks a bit like this:
def something
some block of code
return
The Brushy Frame script defines and uses MakePainter and
FindBrushyTool for instance.
Look for documentation and more examples at http://www.python.org
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|