This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > August 2006 > hi SuzShook, got a little script queston
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 |
hi SuzShook, got a little script queston
|
|
| McGrandpa 2006-08-13, 6:39 pm |
| underprocessable | |
| SuzShook 2006-08-13, 6:39 pm |
| McG - should be quite simple to iterate through the layers - I'm assuming
you want ALL layers in any selected image changed in this manner. If that's
not correct, let me know. I'll post a modified script that processes all
layers in an image shortly. Suz
McGrandpa wrote:
> I've calibrated a pair of new monitors, and the result is a much
> brighter display. That isn't a problem with my photographs or most
> scanned images. That's why I did this. It is a problem with a
> couple thousand .psp images I keep that all have some layers and now
> are all much too light. I got to wondering if there was a way that I can
> do what I want with
> Scripting, as it would take a LONG time to do manually.
>
> a .psp file can have all its layers gamma changed a set amount, saved
> w/same name then closed.
>
> Each of these files have 'selections promoted to full layer'
> (arbitrary number, some 1 or 2, others many), they're simple layers,
> lower the gamma .5 or .6, no matter what transparency or visibility
> already is. some of the files may have only one layer that is raster
> selection in transparent background. Such as a selection that's
> Pasted as Image then saved as a .psp file, maintaining the
> transparent part and no further work done to that image
>
> Here is one I recorded that works, trusted. I don't see why the
> language can't start at the top of the layers list, recurse through
> the list, lowering gamma each item, then save and close file. I just
> don't know how to do that :) But once I SEE how to do that, then I
> should be able to do a lot of things to all layers in a file as
> needed.
> I open the ROSES-selections.psp file, then run this script from
> Trusted.
> TIA Suz!
> McG.
| |
| McGrandpa 2006-08-13, 6:39 pm |
| Yes, that is exactly what I need to do. ALL layers. Thanks!
McG.
"SuzShook" <suzshook@adelphia.net> wrote in message
news:44df120f$1_2@cnews...
> McG - should be quite simple to iterate through the layers - I'm assuming
> you want ALL layers in any selected image changed in this manner. If
> that's not correct, let me know. I'll post a modified script that
> processes all layers in an image shortly. Suz
>
> McGrandpa wrote:
>
>
| |
| SuzShook 2006-08-13, 6:39 pm |
| underprocessable | |
|
| On Sun, 13 Aug 2006 08:21:36 -0400, "SuzShook" <suzshook@adelphia.net>
wrote:
>OK, McG - here's a mod to your script that should do what you want,
>recursing through all layers, lowering the gamma as it goes. Once you've
>run the script on one image, you can repeat (CTRL+Y) to run it on the next
>image, etc. Another thing you might try, if you have many images open, is
>run the script just through the Save step, on the first image. Then, in the
>History palette, right-click on the "Script: gammadown-mod2" action and
>choose "Apply to other open documents" in the context menu (or just hit the
>D key) to apply the script to all open documents. Then you can choose
>Window...Close All to close all open documents. Makes the job REAL easy.
>I've attached the mod2 script as well.
>
>Let me know if this does the job for you! Suz
A suggestion- Use the batch mode to run the script. This gives the
option of selecting multiple files to process.
File>Batch Process
enter the script from the list.
Since the file save was written into the script, be sure to check
"Save Mode - Script":.
RonV
| |
| McGrandpa 2006-08-13, 6:39 pm |
|
"RonV" <RonVick@Nospam.com> wrote in message
news:0f7ud25jqbegg1o6top43mn07b30slqj40@4ax.com...
> On Sun, 13 Aug 2006 08:21:36 -0400, "SuzShook" <suzshook@adelphia.net>
> wrote:
>
>
> A suggestion- Use the batch mode to run the script. This gives the
> option of selecting multiple files to process.
>
> File>Batch Process
> enter the script from the list.
> Since the file save was written into the script, be sure to check
> "Save Mode - Script":.
>
> RonV
>
Right, try on one file in test folder first, then the whole test folder :)
McG.
| |
| McGrandpa 2006-08-13, 6:39 pm |
| It works!
Suz, since there are several sets of folders, some with hundreds of images
to do, and it works with Batch Process fine.... looks like the way to go for
this job. Both scripts work. Singly and with batch process. I just had to
get the scripts to the ONE trusted folder. I guess the ones in My Documents
must be named exactly the same including spaces and hyphens? The scripts
will run from any folder, but will only File Save from the folder in
\Program Files (x86)\Corel\Corel Paint Shop Pro X\Scripts-Trusted. So
that's the folder they're in now.
Now to do one for DropSaturationAll :) Hm. Wonder if I can add that
section to the script you wrote? Fixin to check that out :o))
Thanks Suz!
McG.
"SuzShook" <suzshook@adelphia.net> wrote in message news:44df1885_1@cnews...
> OK, McG - here's a mod to your script that should do what you want,
> recursing through all layers, lowering the gamma as it goes. Once you've
> run the script on one image, you can repeat (CTRL+Y) to run it on the next
> image, etc. Another thing you might try, if you have many images open, is
> run the script just through the Save step, on the first image. Then, in
> the History palette, right-click on the "Script: gammadown-mod2" action
> and choose "Apply to other open documents" in the context menu (or just
> hit the D key) to apply the script to all open documents. Then you can
> choose Window...Close All to close all open documents. Makes the job REAL
> easy. I've attached the mod2 script as well.
>
> Let me know if this does the job for you! Suz
> --
> Suz Shook
> C-Tech Volunteer
>
>
> McGrandpa wrote:
>
>
>
| |
| McGrandpa 2006-08-13, 6:39 pm |
|
"RonV" <RonVick@Nospam.com> wrote in message
news:0f7ud25jqbegg1o6top43mn07b30slqj40@4ax.com...
> On Sun, 13 Aug 2006 08:21:36 -0400, "SuzShook" <suzshook@adelphia.net>
> wrote:
>
>
> A suggestion- Use the batch mode to run the script. This gives the
> option of selecting multiple files to process.
>
> File>Batch Process
> enter the script from the list.
> Since the file save was written into the script, be sure to check
> "Save Mode - Script":.
>
> RonV
>
That worked Ron, but so did 'overwrite'... which I did before reading this
the first time. What would be undesirable about that?
McG.
| |
|
| On Sun, 13 Aug 2006 11:03:30 -0600, "McGrandpa"
<McGrandpaNOT@NOThotmail.com> wrote:
>
>"RonV" <RonVick@Nospam.com> wrote in message
>news:0f7ud25jqbegg1o6top43mn07b30slqj40@4ax.com...
>
>That worked Ron, but so did 'overwrite'... which I did before reading this
>the first time. What would be undesirable about that?
>McG.
>
Actually, nothing. I think the Batch is programmed to ignore a script
save if overwrite is selected, but if not, all you do is write the
same image twice. Just a little longer operation time.
RonV
| |
| McGrandpa 2006-08-13, 6:39 pm |
| underprocessable | |
| McGrandpa 2006-08-13, 6:39 pm |
|
"RonV" <RonVick@Nospam.com> wrote in message
news:4amud2dmf3is776m7kdef1afc37kveqq31@4ax.com...
> On Sun, 13 Aug 2006 11:03:30 -0600, "McGrandpa"
> <McGrandpaNOT@NOThotmail.com> wrote:
>
> Actually, nothing. I think the Batch is programmed to ignore a script
> save if overwrite is selected, but if not, all you do is write the
> same image twice. Just a little longer operation time.
>
> RonV
>
Right, using 'script save' so it saves once.
| |
| SuzShook 2006-08-13, 6:39 pm |
| The way you have it in the mod3 script will process the
ColorAdjustGammaCorrect and then the ColorAdjustHSL on each layer before
moving to the next layer, McG. That's how you have it coded - there's only
one set of recursions.
As far as why your script won't run "trusted" from the My Documents
Scripts - Trusted folder - it should. Are you sure you have the My
Documents defined in File Locations? And are you sure you don't have any
subfolders defined as trusted when the major folder is also defined as
trusted? And are you sure you don't have another script with the same name
in a Restricted folder? This should work if defined carefully. A Save
requires that the script be run "trusted". Suz
McGrandpa wrote:[color=darkred]
> AIght!!! That worked :)
> So, looking at the results, .6 was too aggressive, set that to .7 and
> it was fine. Then I realized saturation was quite high, so added the
> part to also arbitrarily drop saturation -20, and through a few
> minutes of trial and error, got all the indents right and it executed
> to the last line, where it would only save if run from a trusted
> folder. Which, it was, but in the My Documents. Moved the script
> from there to be the only one to exist, and in program files PSP X
> trusted folder. Then it worked. This also batch processes an entire
> folder or just selection of files just fine, one layer to dozens of
> layers.
> I note that as written this will execute, lower gamma recursively
> through all layers, then go to drop saturation recursively through
> all layers, save/close then do next file.
> How would you perform two operations (or more?) on each layer before
> doing the next layer? Thereby doing two ops in one full set of
> recursions instead of two.
>
> This is fun :)
> McG.
>
> "SuzShook" <suzshook@adelphia.net> wrote in message
> news:44df1885_1@cnews...
| |
| McGrandpa 2006-08-13, 6:39 pm |
|
"SuzShook" <suzshook@adelphia.net> wrote in message news:44df8060_1@cnews...
> The way you have it in the mod3 script will process the
> ColorAdjustGammaCorrect and then the ColorAdjustHSL on each layer before
> moving to the next layer, McG. That's how you have it coded - there's
> only one set of recursions.
Oh great! I thought it looked like it *should* execute like that. But
watching it work on an open image it appeared to do the gamma thru the list
then do the hsl thru the list. Appeared. just a casual observation
watching the image change before my eyes :)
As long as I don't put too many operations per layer in there, it should
complete each file pretty quick. It doesn't really matter how long it does
take the script and batch process; it's infinitely faster and easier than
doing it manually!!!!
>
> As far as why your script won't run "trusted" from the My Documents
> Scripts - Trusted folder - it should. Are you sure you have the My
> Documents defined in File Locations? And are you sure you don't have any
> subfolders defined as trusted when the major folder is also defined as
> trusted? And are you sure you don't have another script with the same
> name in a Restricted folder? This should work if defined carefully. A
> Save requires that the script be run "trusted". Suz
There is only One. I haven't even dropped it into PSP 9's trusted scripts
folder yet. I'll have a look through all the locations set in Preferences
for 9 and X. I may have some redundancy there.
This is starting to remind me of QB 4.5 daze Suz :o) Only this is more fun.
Thanks a million!
McG.
>
> McGrandpa wrote:
>
>
| |
| SuzShook 2006-08-13, 6:39 pm |
| Glad to help, McG. Suz
McGrandpa wrote:[color=darkred]
> "SuzShook" <suzshook@adelphia.net> wrote in message
> news:44df8060_1@cnews...
>
> Oh great! I thought it looked like it *should* execute like that. But
> watching it work on an open image it appeared to do the gamma
> thru the list then do the hsl thru the list. Appeared. just a
> casual observation watching the image change before my eyes :)
>
> As long as I don't put too many operations per layer in there, it
> should complete each file pretty quick. It doesn't really matter how
> long it does take the script and batch process; it's infinitely
> faster and easier than doing it manually!!!!
>
>
> There is only One. I haven't even dropped it into PSP 9's trusted
> scripts folder yet. I'll have a look through all the locations set
> in Preferences for 9 and X. I may have some redundancy there.
>
> This is starting to remind me of QB 4.5 daze Suz :o) Only this is
> more fun.
> Thanks a million!
> McG.
>
>
>
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|