This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > January 2007 > Script to combine to RGB
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 |
Script to combine to RGB
|
|
|
|
| Willy 2007-01-27, 11:39 pm |
| Guess I am a little dense here. I can't see scripting this command since I
usually want to use the same split channel twice or from another image.
The way I see it when you activate the combine channel command then click
the drop down arrow for the color you can move the mouse in the dropdown
window and get a very definite 3 line split. So you can select what ever
channel you want RGB (line 1,2,3). For example you may want two green
channels ..... so you use the second line for the channel you don't want.
It gets a little more tricky if you split more than one image and
combine ---- the dropdown lines increase by 3 for each image.So if you want
to combine the red channel from image two you use the fourth line in the red
dropdown box and the appropriate lines in the green and blue. Hope this
makes some sense.......
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98BF9626E97FCJoeB@216.191.232.194...
> Apparently v.XI doesn't combine from RGB properly using the menu command
> to do so after an image has been split to RGB. Spandex came up with a
> workaround, which is that when the Combint from RGB dialogue is open you
> tab, down arrow once, tab again and down arrow twice and click OK.
> Apparently the program knows that the first channel is red, the second
> green and the third one blue, even though this doesn't appear in the
> dialogue.
>
> Big Bad Dave then suggested it might be possible to script it and bind
> that script to an icon and put it in the Image menu.
>
> While I don't have v.XI, I thought I'd see what happened if I tried to
> script the Combine from RGB in v.9. The results were less than
> spectacular and appeared to be the way the recording of the script
> numbered the image order. In the end, the attached short script with
> numbering seems to work, providing that two conditions apply:
>
> 1) After doing whatever manips you want on the greyscale channels, you
> have to put focus back on the original image (from which the channels
> were derived) before running the script.
>
> 2) You have to split the image to RGB when that image is the most
> current document in your workspace. For example, if you open Image 1,
> then open Image 2, then put focus back on Image 1 and split it to RGB,
> the script will not run to combine from RGB even if you follow the rule
> of putting focus on the original Image 1 when you try to run it.
> However, the exception to that is that if you first close Image 2 before
> trying to combine from RGB by running the script (and first putting
> focus back on Image 1 it will work.
>
> While this isn't a big deal because SR's workaround works in all cases,
> I was wondering if Suz or somebody knew of a way to create a script that
> would also work in all cases (i.e., without being dependant either on
> re-focussing on the original image or worrying about whether documents
> were opened subsequent to the opening of the original image.
>
> By the way, I took out the version info at the top of the script so
> those who are able to can ensure that it works in v.XI.
>
> Regards,
>
> JoeB
| |
|
| "Willy" <willy@hotmail.com> wrote in news:45b3e526$1_3@cnews:
> Guess I am a little dense here. I can't see scripting this command
> since I usually want to use the same split channel twice or from
> another image. The way I see it when you activate the combine channel
> command then click the drop down arrow for the color you can move the
> mouse in the dropdown window and get a very definite 3 line split. So
> you can select what ever channel you want RGB (line 1,2,3). For
> example you may want two green channels ..... so you use the second
> line for the channel you don't want. It gets a little more tricky if
> you split more than one image and combine ---- the dropdown lines
> increase by 3 for each image.So if you want to combine the red channel
> from image two you use the fourth line in the red dropdown box and the
> appropriate lines in the green and blue. Hope this makes some
> sense.......
>
> W
>
Nope, you're not dense here :-) As you point out, for anything more
than basically combining the original channels again the script does
nothing, and of course SR's instructions are only good for the same
basic purpose.
But from the posts I've seen where people complained about recombining
the channels in v.XI, the basics seem to have been what they were
looking for, as nobody came back and said "But what do I do if I want
two green channels?" Your info is good stuff for those who wish to do
that.
And as for me, I just got kind of interested in why the basic action of
recombining the original RGB through a script wouldn't work in the
situations I mentioned and wondered if there was a way around it. It's
more a learning experience than anything 'cause I don't even use v.XI.
Regards,
JoeB
>
> "JoeB" <mymail@myserver.com> wrote in message
> news:Xns98BF9626E97FCJoeB@216.191.232.194...
>
>
>
| |
| Joske 2007-01-27, 11:39 pm |
| JoeB wrote:
> Apparently v.XI doesn't combine from RGB properly using the menu
> command to do so after an image has been split to RGB. Spandex
> came up with a workaround, which is that when the Combint from
> RGB dialogue is open you tab, down arrow once, tab again and down
> arrow twice and click OK. Apparently the program knows that the
> first channel is red, the second green and the third one blue,
> even though this doesn't appear in the dialogue.
> Big Bad Dave then suggested it might be possible to script it and
> bind that script to an icon and put it in the Image menu.
Here's the channel code for XI:
'BlueChannel': 0,
'GreenChannel': -1,
'RedChannel': -2,
Joske
| |
| Jos Croeze 2007-01-27, 11:39 pm |
|
"JoeB" wrote
> And as for me, I just got kind of interested in why the basic action of
> recombining the original RGB through a script wouldn't work in the
> situations I mentioned and wondered if there was a way around it. It's
> more a learning experience than anything 'cause I don't even use v.XI.
Definitely a programmers error, already shown by Joske.
Seems something's programmed as NumberOfItems - ItemNumber should be used as
the ItemIndex. Instead of that ItemNumber - NumberOfItems is used as the
ItemIndex.
Jos Croeze
| |
| Spandex Rutabaga 2007-01-27, 11:39 pm |
| Jos Croeze wrote:
>
> "JoeB" wrote
>
>
> Definitely a programmers error, already shown by Joske.
> Seems something's programmed as NumberOfItems - ItemNumber should be used as
> the ItemIndex. Instead of that ItemNumber - NumberOfItems is used as the
> ItemIndex.
I suspect it's more complicated than that I'm afraid. Please
take a look at the thread:
Subject: PSPXI Image Combine
Date: Sat, 20 Jan 2007 11:42:28 -0500
From: "SamIAmFayetteville" <samiamfayetteville@nc.rr.com>
Organization: "Another Corel User"
Newsgroups: corel.PaintShopProPhotoXI
| |
| Spandex Rutabaga 2007-01-27, 11:39 pm |
| JoeB wrote:
>
> Apparently v.XI doesn't combine from RGB properly using the menu command
> to do so after an image has been split to RGB. Spandex came up with a
> workaround, which is that when the Combint from RGB dialogue is open you
> tab, down arrow once, tab again and down arrow twice and click OK.
Actually the credit belongs to Larry Bolch, not to me. See:
Subject: Re: Splitting Channels After Installing the Patch
Date: Fri, 22 Dec 2006 18:22:17 -0700
From: "Larry N. Bolch" <lnbolch@telusplanet.net>
Organization: "Another Corel User"
Newsgroups: corel.PaintShopProPhotoXI
| |
|
| "Joske" <j.backer@home.nl> wrote in news:45b404c2$1_2@cnews:
> JoeB wrote:
>
>
>
> Here's the channel code for XI:
>
> 'BlueChannel': 0,
> 'GreenChannel': -1,
> 'RedChannel': -2,
>
> Joske
>
I appreciate your response, Joske. As I only have v.9 at present to work
with I'm not sure I can use this info to see if the code in a script will
prevent problems if the the source image isn't first placed in focus, or
whether it will solve the problem of what happens if other images are
subsequently opened before one reverts to a previous image and splits its
channels. When time permits I may install v.XI on my new system to try it
out. But the info is welcome.
Regards,
JoeB
| |
|
| "Jos Croeze" <j.c.croeze@home.nl> wrote in news:45b4098f_2@cnews:
>
> "JoeB" wrote
>
>
> Definitely a programmers error, already shown by Joske.
> Seems something's programmed as NumberOfItems - ItemNumber should be
> used as the ItemIndex. Instead of that ItemNumber - NumberOfItems is
> used as the ItemIndex.
>
> Jos Croeze
>
Thanks Jos, and as I replied to Joske, I appreciate your response. As I
only have v.9 at present to work with I'm not sure I can use this info to
see if the code in a script will prevent problems if the the source image
isn't first placed in focus, or whether it will solve the problem of what
happens if other images are subsequently opened before one reverts to a
previous image and splits its channels. When time permits I may install
v.XI on my new system to try it out. But the info is welcome and
appreciated.
Regards,
JoeB
| |
| Joske 2007-01-27, 11:39 pm |
| JoeB wrote:
> "Joske" wrote
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> I appreciate your response, Joske. As I only have v.9 at present
> to work with I'm not sure I can use this info to see if the code
> in a script will prevent problems if the the source image isn't
> first placed in focus, or whether it will solve the problem of
> what happens if other images are subsequently opened before one
> reverts to a previous image and splits its channels. When time
> permits I may install v.XI on my new system to try it out. But
> the info is welcome.
The code as recorded in XI will only work if the focus is on the
last (Blue) image of the three. Once more I just can't believe what
they have done to this once incomparable software. Who they let
'have a crack at it'.
Joske
| |
| David Gilbert 2007-01-27, 11:39 pm |
| On Mon, 22 Jan 2007 03:30:36 +0100, "Joske" <j.backer@home.nl> wrote:
>.................................................... Once more I just =
can't believe what
>they have done to this once incomparable software. Who they let
>'have a crack at it'.
>
>Joske
Have to agree with you there. Says a lot about their Beta testing and
(lack of) quality control. Something like that shouldn't have got out
the door.
--=20
David: NorthWest England
WinXP Home SP2, Athlon2000, 1Gb RAM
NVidia GeForce4 Ti4400
PSP 7.04 & 9.011 & X.03
| |
| SuzShook 2007-01-27, 11:39 pm |
| JoeB wrote:
> Apparently v.XI doesn't combine from RGB properly using the menu
> command to do so after an image has been split to RGB. Spandex came
> up with a workaround, which is that when the Combint from RGB
> dialogue is open you tab, down arrow once, tab again and down arrow
> twice and click OK. Apparently the program knows that the first
> channel is red, the second green and the third one blue, even though
> this doesn't appear in the dialogue.
>
> Big Bad Dave then suggested it might be possible to script it and bind
> that script to an icon and put it in the Image menu.
>
> While I don't have v.XI, I thought I'd see what happened if I tried to
> script the Combine from RGB in v.9. The results were less than
> spectacular and appeared to be the way the recording of the script
> numbered the image order. In the end, the attached short script with
> numbering seems to work, providing that two conditions apply:
>
> 1) After doing whatever manips you want on the greyscale channels,
> you have to put focus back on the original image (from which the
> channels were derived) before running the script.
>
> 2) You have to split the image to RGB when that image is the most
> current document in your workspace. For example, if you open Image 1,
> then open Image 2, then put focus back on Image 1 and split it to RGB,
> the script will not run to combine from RGB even if you follow the
> rule of putting focus on the original Image 1 when you try to run it.
> However, the exception to that is that if you first close Image 2
> before trying to combine from RGB by running the script (and first
> putting focus back on Image 1 it will work.
>
> While this isn't a big deal because SR's workaround works in all
> cases, I was wondering if Suz or somebody knew of a way to create a
> script that would also work in all cases (i.e., without being
> dependant either on re-focussing on the original image or worrying
> about whether documents were opened subsequent to the opening of the
> original image.
>
> By the way, I took out the version info at the top of the script so
> those who are able to can ensure that it works in v.XI.
>
> Regards,
>
> JoeB
You are right, Joe, that the results are dependent upon how PSP keeps track
of the image order. Each image is numbered according to the order in which
it was opened, with the first image opened being at index 0, the second, at
index 1, the third, at index 2, etc. When you recorded your script, you had
focus on the image that was split, which was the first image opened in your
workspace, making the RedChannel image +1 in the stack, the BlueChannel
image +2 in the stack, and the GreenChannel image, +3. PSP always keeps
track of the order in which images were opened. So to create a script that
would work in all instances, no matter which image has focus when the script
is run, doesn't seem "do-able" to me at this point. If you could determine
which image was active at the time the script is executed, then you could
correctly number the red, green, and blue channels, but I can't see a way to
do that, Joe. I've looked at the data for all four images involved, and I
don't see how you could reliably determine which image is active - without
that information, you can't determine how to get to the Red, Green, and Blue
channels, no matter what they're called. There may be a way - I just can't
see it. Suz
| |
| Willy 2007-01-27, 11:39 pm |
| I think you might be able to do this by having two scripts. One that does
the split and records the image index and the second that reads the image
index and then combines the channels. I have not given this much though, but
just of the top of my head.
W
"SuzShook" <suzshook@adelphia.net> wrote in message
news:45b60e39$1_2@cnews...
> JoeB wrote:
>
> You are right, Joe, that the results are dependent upon how PSP keeps
> track of the image order. Each image is numbered according to the order
> in which it was opened, with the first image opened being at index 0, the
> second, at index 1, the third, at index 2, etc. When you recorded your
> script, you had focus on the image that was split, which was the first
> image opened in your workspace, making the RedChannel image +1 in the
> stack, the BlueChannel image +2 in the stack, and the GreenChannel image,
> +3. PSP always keeps track of the order in which images were opened. So
> to create a script that would work in all instances, no matter which image
> has focus when the script is run, doesn't seem "do-able" to me at this
> point. If you could determine which image was active at the time the
> script is executed, then you could correctly number the red, green, and
> blue channels, but I can't see a way to do that, Joe. I've looked at the
> data for all four images involved, and I don't see how you could reliably
> determine which image is active - without that information, you can't
> determine how to get to the Red, Green, and Blue channels, no matter what
> they're called. There may be a way - I just can't see it. Suz
>
| |
|
| "SuzShook" <suzshook@adelphia.net> wrote in news:45b60e39$1_2@cnews:
> JoeB wrote:
>
> You are right, Joe, that the results are dependent upon how PSP keeps
> track of the image order. Each image is numbered according to the
> order in which it was opened, with the first image opened being at
> index 0, the second, at index 1, the third, at index 2, etc. When you
> recorded your script, you had focus on the image that was split, which
> was the first image opened in your workspace, making the RedChannel
> image +1 in the stack, the BlueChannel image +2 in the stack, and the
> GreenChannel image, +3. PSP always keeps track of the order in which
> images were opened. So to create a script that would work in all
> instances, no matter which image has focus when the script is run,
> doesn't seem "do-able" to me at this point. If you could determine
> which image was active at the time the script is executed, then you
> could correctly number the red, green, and blue channels, but I can't
> see a way to do that, Joe. I've looked at the data for all four
> images involved, and I don't see how you could reliably determine
> which image is active - without that information, you can't determine
> how to get to the Red, Green, and Blue channels, no matter what
> they're called. There may be a way - I just can't see it. Suz
>
Thanks for the info, Suz. For the little extra time SR's method takes
to combine channels in v.XI the script really doesn't really add much in
any event. But I've learned more about what's going on in the
background, which is never a bad thing :-)
Regards,
JoeB
| |
| SuzShook 2007-01-27, 11:39 pm |
| I've been playing with this, and I can combine from RGB, as long as the
active image is one of the split images. I see no way to do this reliably
if the original image is active, or if any other intermediary image is
active. I just don't see how we can reliably get back to the red, green, or
blue image if we don't know what has been opened in the meantime, after the
split image was opened, but before the split, or after the split occurred.
I don't see any clear relationship between the split image and the splits -
there can be many other images in the stack between the image being split
and the splits. And I'm just working with PSP X, where the Titles of the
split images clearly contain Red, Green, and Blue. I don't have the patch
on PSP XI, but I'm sure that situation would be even more difficult to deal
with. In order to use such a script, one would have to "know" the names of
at least one of the split images. I suppose that would be possible if a
script runs immediately after the split, when the "blue" image is active,
saving the name of that image in the ScriptData Communications area, and
then iterating through the open documents when it's time to recombine until
the document with that Title is found. That would then be the current
document, the green image would be -1, and the red image would be -2. Seems
much too complicated to be practical, in view of the fact we have a
work-around, and this will probably be fixed in the next patch. Suz
Willy wrote:[color=darkred]
> I think you might be able to do this by having two scripts. One that
> does the split and records the image index and the second that reads
> the image index and then combines the channels. I have not given this
> much though, but just of the top of my head.
> W
>
> "SuzShook" <suzshook@adelphia.net> wrote in message
> news:45b60e39$1_2@cnews...
| |
| Willy 2007-01-27, 11:39 pm |
| underprocessable | |
|
|
| Willy 2007-01-27, 11:39 pm |
| underprocessable | |
| Willy 2007-01-27, 11:39 pm |
| Duh.... don't need this line in the script
App.Do( Environment,'SelectAll',{}, Doc )
W
"Willy" <willy@hotmail.com> wrote in message news:45b66fe5_2@cnews...
> Test this script. I didn't have time to look up how to find the number of
> open images so I jerry rigged it for now.
>
> W
>
> "SuzShook" <suzshook@adelphia.net> wrote in message
> news:45b60e39$1_2@cnews...
>
>
>
| |
|
| "Willy" <willy@hotmail.com> wrote in news:45b67ce4_1@cnews:
> After you split the image did you close the original?
> W
That works, but again only if I haven't opened any subsequent images.
So I'm afraid nothing has been gained, and it requires the closing of
the original.
Regards,
JoeB
[color=darkred]
> "JoeB" <mymail@myserver.com> wrote in message
> news:Xns98C192DAECB4CJoeB@216.191.232.194...
number[color=darkred]
attempts[color=darkred]
an[color=darkred]
then[color=darkred]
later[color=darkred]
on[color=darkred]
where[color=darkred]
same[color=darkred]
not a[color=darkred]
but[color=darkred]
| |
| Willy 2007-01-27, 11:39 pm |
| Hmmm... I can open a file, split it and (I was under the impression you
normally closed the original) then open and close other files and it still
combines the original RGB files.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C199C928E58JoeB@216.191.232.194...[color=darkred]
> "Willy" <willy@hotmail.com> wrote in news:45b67ce4_1@cnews:
>
>
> That works, but again only if I haven't opened any subsequent images.
> So I'm afraid nothing has been gained, and it requires the closing of
> the original.
>
> Regards,
>
> JoeB
>
>
>
>
>
>
> number
> attempts
> an
> then
> later
> on
> where
> same
> not a
> but
| |
|
| "Willy" <willy@hotmail.com> wrote in news:45b6a53b$1_2@cnews:
> Hmmm... I can open a file, split it and (I was under the impression
> you normally closed the original) then open and close other files and
> it still combines the original RGB files.
> W
Closing the original file which you split to RGB isn't something I do,
and there is no reason to do so. Once you have worked on the greyscale
channels and recombine them, they do so as a separate image, which in
PSP9 is named Image 2, for example. Having the original image open
gives you the opportunity to compare it to the original. If you want to
tweak the greyscale channels further you can do so and combine again
from RGB and the result is Image 3.
You are correct about one thing. If you open a file, split it, then
open and close other files, you can recombine the split greyscale images
with your script. As I have said in my various posts, that is not the
issue with my script.
Try opening a file (file #1), then opening file #2. Then, with file #2
still open, click on the title bar of File #1. Then split that file #1
to RGB, and then try to Combine from RGB. Therein lies one of the
issues.
Regards,
JoeB
> "JoeB" <mymail@myserver.com> wrote in message
> news:Xns98C199C928E58JoeB@216.191.232.194...
>
| |
| Willy 2007-01-27, 11:39 pm |
| I'll have to tweak it when I have a little time.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C1BCD0FE890JoeB@216.191.232.194...
> "Willy" <willy@hotmail.com> wrote in news:45b6a53b$1_2@cnews:
>
>
> Closing the original file which you split to RGB isn't something I do,
> and there is no reason to do so. Once you have worked on the greyscale
> channels and recombine them, they do so as a separate image, which in
> PSP9 is named Image 2, for example. Having the original image open
> gives you the opportunity to compare it to the original. If you want to
> tweak the greyscale channels further you can do so and combine again
> from RGB and the result is Image 3.
>
> You are correct about one thing. If you open a file, split it, then
> open and close other files, you can recombine the split greyscale images
> with your script. As I have said in my various posts, that is not the
> issue with my script.
>
> Try opening a file (file #1), then opening file #2. Then, with file #2
> still open, click on the title bar of File #1. Then split that file #1
> to RGB, and then try to Combine from RGB. Therein lies one of the
> issues.
>
> Regards,
>
> JoeB
>
>
>
| |
| Willy 2007-01-27, 11:39 pm |
| It is dificult with the Patch to XI, but is just one of thoses CHALLENGES!!!
:)
W
"SuzShook" <suzshook@adelphia.net> wrote in message
news:45b64eff$1_1@cnews...
> I've been playing with this, and I can combine from RGB, as long as the
> active image is one of the split images. I see no way to do this reliably
> if the original image is active, or if any other intermediary image is
> active. I just don't see how we can reliably get back to the red, green,
> or blue image if we don't know what has been opened in the meantime, after
> the split image was opened, but before the split, or after the split
> occurred. I don't see any clear relationship between the split image and
> the splits - there can be many other images in the stack between the image
> being split and the splits. And I'm just working with PSP X, where the
> Titles of the split images clearly contain Red, Green, and Blue. I don't
> have the patch on PSP XI, but I'm sure that situation would be even more
> difficult to deal with. In order to use such a script, one would have to
> "know" the names of at least one of the split images. I suppose that
> would be possible if a script runs immediately after the split, when the
> "blue" image is active, saving the name of that image in the ScriptData
> Communications area, and then iterating through the open documents when
> it's time to recombine until the document with that Title is found. That
> would then be the current document, the green image would be -1, and the
> red image would be -2. Seems much too complicated to be practical, in view
> of the fact we have a work-around, and this will probably be fixed in the
> next patch. Suz
>
> Willy wrote:
>
>
| |
| SuzShook 2007-01-27, 11:39 pm |
| underprocessable | |
| Willy 2007-01-27, 11:39 pm |
| underprocessable | |
| Willy 2007-01-27, 11:39 pm |
| Suz,
Is this what the output should be? Using patched ver XI.
When you are ready to combine the images again,
activate the image entitled
and then restart this script.
Executing ImageInfo
Executing ImageInfo
Script 'ss-CombineRGB11-03' has completed successfully.
W
"SuzShook" <suzshook@adelphia.net> wrote in message
news:45b761fc$1_2@cnews...
> Here's another "solution" to this problem. This script does both the
> split and recombine for you. Just activate the image you want to split,
> and run the script - it runs in the Pause Script format, and does the
> following:
> 1. Splits the image to RGB channels.
> 2. Saves the name of the BLUE channel image, and writes that name to
> the Script Output palette - this will be used later to recombine the
> individual images.
> 3. Pauses to allow user to do whatever to the individual images.
> 4. When the user is ready to re-combine the split channel images,
> check the Script Output palette to see what the name of the BLUE channel
> image was, and activate that image.
> 5. Rerun the script - it will continue (without the "Continue with xx
> script step yy?" message) and recombine the individual channel images.
> This script works no matter what images are open, and no matter when they
> are opened - before the original is opened, after the original is opened,
> after the split is done....it makes no difference. The key is to activate
> the BLUE channel image before continuing the script.
> Suz
>
> JoeB wrote:
>
>
>
| |
|
| "SuzShook" <suzshook@adelphia.net> wrote in news:45b761fc$1_2@cnews:
> Here's another "solution" to this problem. This script does both the
> split and recombine for you. Just activate the image you want to
> split, and run the script - it runs in the Pause Script format, and
> does the following:
> 1. Splits the image to RGB channels.
> 2. Saves the name of the BLUE channel image, and writes that name
> to
> the Script Output palette - this will be used later to recombine the
> individual images.
> 3. Pauses to allow user to do whatever to the individual images.
> 4. When the user is ready to re-combine the split channel images,
> check
> the Script Output palette to see what the name of the BLUE channel
> image was, and activate that image.
> 5. Rerun the script - it will continue (without the "Continue
> with xx
> script step yy?" message) and recombine the individual channel images.
> This script works no matter what images are open, and no matter when
> they are opened - before the original is opened, after the original is
> opened, after the split is done....it makes no difference. The key is
> to activate the BLUE channel image before continuing the script.
> Suz
>
Good work, Suz, that one does the trick in v.9. Of course I know what
the blue channel is in v.9 because it works properly anyway, but the
script output does what you said it does, and it combines under any
circumstances.
So for those who want v.XI to simply split channels, work on those
channels and then recombine them all this does the trick. Those who
want to do more complicated stuff will just have to wait until they fix
the problem in v.XI.
Regards,
JoeB
| |
|
| "Willy" <willy@hotmail.com> wrote in news:45b7734e$1_2@cnews:
> Suz,
> Is this what the output should be? Using patched ver XI.
> When you are ready to combine the images again,
>
> activate the image entitled
>
> and then restart this script.
>
> Executing ImageInfo
>
> Executing ImageInfo
>
> Script 'ss-CombineRGB11-03' has completed successfully.
>
> W
It should be "activate the image entitled Blue. Otherwise, that's what the
output should be and you should get the rgb images combined.
Regards,
JoeB
| |
| Willy 2007-01-27, 11:39 pm |
| That is the trouble.... the images have no name so to speak. Oh well I think
the last one I posted will work.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C271DC6CC42JoeB@216.191.232.194...
> "Willy" <willy@hotmail.com> wrote in news:45b7734e$1_2@cnews:
>
>
> It should be "activate the image entitled Blue. Otherwise, that's what
> the
> output should be and you should get the rgb images combined.
>
> Regards,
>
> JoeB
| |
|
|
| Willy 2007-01-27, 11:39 pm |
| Yes that is correct on the names. Did you try my last script? Up just under
Suz msg.
The numbering doesn't make any sense to me. I thought this would be fixed by
now. It can't be that big of a deal!!
Thanks for the mod Joe.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C2980B07EB0JoeB@216.191.232.194...
> "Willy" <willy@hotmail.com> wrote in news:45b7aaa8_2@cnews:
>
>
> Ah, that's right. I forgot that in v.XI when you split the channels each
> of the channel images just say Raster, and they aren't named like they are
> in v.9.
>
> I modified Suz' script a bit so that the Blue channel image, which is the
> last one opened when you split the channels, is renamed to Blue rather
> than
> Raster 1. That at least will show you what the Blue channel is so you can
> select it to recombine the channels. The modified script is attached.
> Now
> if I knew how to rename the others on the fly without it messing up the
> document numbering order then the other layers could be named red and
> green.
>
> Anyway, as you said in another post, it's been a challenge!
>
> Regards,
>
> JoeB
>
>
>
>
>
>
| |
|
|
| Willy 2007-01-27, 11:39 pm |
| That is nice to have the names, but I have a small problem with these
scripts in general. If for example you fiddle with a channel and combine,
then don't like it you can't do the combine again with the pause scripting.
I have not been able to think of a way to mess with the grayscale after the
first combine then combine again. I thought the try statements would allow
my last script to run no matter what images were open or closed. Glad I
don't use this split/combine very often.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C2B35483CB9JoeB@216.191.232.194...[color=darkred]
> "Willy" <willy@hotmail.com> wrote in news:45b7da28_1@cnews:
>
>
> Yes, I've tried all the scripts, and I'm afraid your didn't work under
> all conditions, for example when there had been intervening images
> opened. That's where the document numbering causes problems and where
> Suz' script works.
>
> However, I now have another mod you might want to try.
>
> Try the attached script (which is just a further mod of Suz' script).
> If you open your image and run this script, you should get your image
> split into RGB channel images. This time, each greyscale image should
> have a name like Red, Green or Blue (instead of Raster 1). This will at
> least let you know which greyscale channel is which.
>
> When finished working on the greyscale channels, then of course you
> still have to put focus on the Blue image and then run the script again
> to recombine from RGB.
>
> The reason that the v.XI combine channels doesn't work is because, as
> you made me realize, when it splits to RGB it only shows that each
> channel is a raster image. In v.9 each image has a name (Red, Green or
> Blue) in the title bar (just like any file you open has a name) as well
> as the indication that it is a raster layer. The Combine from RGB
> obviously takes the file name in previous versions, but because there is
> no file name created with the split channels in v.XI there is no data
> for the Combine tool to put into the Combine dialogue box. It was your
> reminder about no names that made me think of that.
>
> Now if Corel could figure that out, they could easily fix it. :-)
>
> Regards,
>
> JoeB
>
>
>
| |
| Willy 2007-01-27, 11:39 pm |
| underprocessable | |
|
|
| Willy 2007-01-27, 11:39 pm |
| I'll check it out when I get back to a computer with PSP loaded.
W
"JoeB" <mymail@myserver.com> wrote in message
news:Xns98C2D0F3210F8JoeB@216.191.232.194...
> "Willy" <willy@hotmail.com> wrote in news:45b8035a$1_1@cnews:
>
>
>
> I just downloaded your script and, in v.9 I can't get it to run. But
> that may not be an issue now, because I think I have the problem solved.
> You will be the person to test it, although I'll ping Suz also about it.
>
> I would stress that the attached scripts were done based on all of the
> discussion between you, me and Suz, as well as Suz' last posted script,
> and my finally realizing that the problem in the v.XI Combine from RGB
> is because the split greyscale images don't have file names, just layer
> info.
>
> I am attaching 3 scripts. The important one is the first one, named
> XI-split_to_RGB.pspscript.
>
> The concept is that the problem in v.XI doesn't really have problems
> recombining from RGB, it's that people don't know what they're combining
> because nothing shows up in the channel boxes of the Combine from RGB
> dialogue.
>
> So here's the way this should work.
>
> Download the scripts. Put all of them in your Scripts>Trusted folder.
>
> What the scripts do is split to RGB any open image you have selected,
> and it doesn't matter how many images you might have open when you
> decide to select one to split.
>
> Each script works the same, but the _01 and -02 scripts just add that
> extension to the file name in the dialoge boxes when you get to the
> stage of Combining from RGB.
>
> The first script (XI-split_to_RGB.pspscript) will actually provide file
> names to each of the split greyscale images. They do this by saving
> each image as a bmp in the Windows/temp folder, which then actually
> provides a file name for each greyscale image (Red.bmp, Green.bmp, and
> Blue.bmp). This file name can now be read by the v.XI Combine from RGB
> dialogues. Now you should be able to do what you want with each
> greyscale channel image and not have to worry about which one is in
> focus when you want to Combine from RGB.
>
> When you're ready to combine, just use the regular Image>Combine from
> RGB from the Image menu item. Now you should see those names in the R,
> G, and B boxes. You can combine as you like, selecting which channel
> you want from each of the R, G, and B channel dropdowns.
>
> What's even better, there are two more attached scripts, one named XI-
> split_to_RGB_01.pspscript and the other XI-split_to_RGB_02.pspscript.
>
> If you have another open image (along with the first one you split) you
> can use the XI-split_to_RGB_01 pspscript script and split that image
> into channels, and they will be named Red_1,bmp, Blue_1.bmp and Green_
> 1.bmp. If you kept your first splits open, now when you go to Image>
> Combine from RGB you'll be able to use the dropdown boxes and select
> from the Red.bmp or Red-O1.bmp, and the same with Blue and Green.
>
> Actually, you can just use the first script on all open images, except
> that in the Combine dialogue box they'll all show up as sucessive
> Red.bmp, Green.bmp and Blue.bmp names, without the sequence numbers
> after them. The additional two scripts just make it easier to see the
> sequence in which you created the splits.
>
> Of course, they can be bound to an icon and placed in your Image menu so
> that you can use them to Split to RGB instead of the default item
> provided. You just use the default Combine from RGB when you're ready
> to do so.
>
> I'll be interested in hearing if this works for you.
>
> Regards,
>
> JoeB
| |
| Willy 2007-01-27, 11:39 pm |
| Joe, Try the attached script it should work in v9
On your scripts I get this error.
------- Command Execution Failed -----------
Command Name: FileSaveAs
Error Text: Unable to open the file.
Traceback (most recent call last):
File "C:\Documents and Settings\Owner\My Documents\My PSP
Files\Scripts-Trusted\zw Scripts\XI_split_to_RGB.PspScript", line 70, in Do
App.Do( Environment, 'FileSaveAs', {
RuntimeError: Unable to open the file.
I think you need to import the OS
W
| |
| Willy 2007-01-27, 11:39 pm |
| underprocessable | |
| Willy 2007-01-27, 11:39 pm |
| The save path was different WINNT instead of WINDOWS. Didn't need the import
os.
The scripts work for naming the split channels and they do show up in the
dropdowns. Good thinking.
Might look at deleting the files you put in the temp folder before the
script exits.
W
| |
|
| "Willy" <willy@hotmail.com> wrote in news:45b8cd9b_2@cnews:
> The save path was different WINNT instead of WINDOWS. Didn't need the
> import os.
> The scripts work for naming the split channels and they do show up in
> the dropdowns. Good thinking.
> Might look at deleting the files you put in the temp folder before the
> script exits.
>
> W
>
Glad to see they work, Willy. It was your reminder that the split files
didn't have file names that put me on the right track and that combining
wouldn't be a problem if the channels had names to start with. The
problem, as you noticed, is that the script has to save the files so as to
give them a name. I just chose the Windows/Temp folder figuring most
people would have one. If I knew how to script and not just record, I'd
likely have it create a folder like c:\pspsplittemp, save the files there,
and delete the folder once the files were saved. If you know how to do
that perhaps you could do so.
Regards,
JoeB
| |
| SuzShook 2007-01-27, 11:39 pm |
| underprocessable | |
|
|
| Spandex Rutabaga 2007-01-27, 11:39 pm |
| SuzShook wrote:
>
> Just replied to you, Joe, in the other thread. I agree - the temp files
> should be deleted. Attached is a mod to Joe's RGB_1 script that does that.
> Good work, Willy and Joe. This has been a learning experience for all of
> us! Suz
>
> P.S. Joe's original script(s) as well as this mod need to be run trusted.
> Making and deleting directories is not a trivial exercise, and should be
> used with caution.
Wouldn't it be better to use as the folder for temporary files
C:\Documents and Settings\User Name\Local Settings\Temp, which
is where PSP puts stuff anyway and to which the user has write
permission?
| |
| SuzShook 2007-01-27, 11:39 pm |
| Spandex Rutabaga wrote:
> SuzShook wrote:
>
> Wouldn't it be better to use as the folder for temporary files
> C:\Documents and Settings\User Name\Local Settings\Temp, which
> is where PSP puts stuff anyway and to which the user has write
> permission?
I'm sure it would be better, Spandex. However, I cannot figure out how to
extract that folder name from the system, and it's likely different for
different users. I suppose that could be edited in the script by the user,
but there are so many users who "don't do scripts" and thus are hesitant to
edit them. Do you know how to capture that name from the system? The
FileLocations command says it "Displays and/or changes the search paths for
the various file types", but I can't figure out how to get it to "display"
the search path for anything. That would be the ideal place to save these
files. Suz
| |
| Willy 2007-01-27, 11:39 pm |
| Suz, I think you can get the location for Undotemp.
I would consider this folder:
C:\Documents and Settings\Owner\My Documents\My PSP Files\Undotemp
Or whatever the path used is.
W
| |
| Willy 2007-01-27, 11:39 pm |
| See if this works Suz,
#####################
from PSPApp import *
def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'Paint Shop Pro Photo',
'Host Version': u'11.11'
}
def Do(Environment):
ListOfDirectories = ['Temp']
DirInfo = App.Do( Environment, 'ReturnFileLocations',)
# Print out all the directories for each location
for DirName in ListOfDirectories:
DirCntName = DirName + 'Num'
DirCnt = DirInfo[ DirCntName ]
print "\nNumber of directories defined for '", DirName, "' is ", DirCnt
Cnt = 0
while Cnt < DirCnt:
print " ", DirInfo[ DirName ][ Cnt ]
Cnt = Cnt + 1
##########################
W
| |
| Willy 2007-01-27, 11:39 pm |
| See if this will do it Suz.
#####################
from PSPApp import *
def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'Paint Shop Pro Photo',
'Host Version': u'11.11'
}
def Do(Environment):
ListOfDirectories = ['Temp']
DirInfo = App.Do( Environment, 'ReturnFileLocations',)
# Print out all the directories for each location
for DirName in ListOfDirectories:
DirCntName = DirName + 'Num'
DirCnt = DirInfo[ DirCntName ]
print "\nNumber of directories defined for '", DirName, "' is ", DirCnt
Cnt = 0
while Cnt < DirCnt:
location = DirInfo[ DirName ][ Cnt ] #var for there
print location
Cnt = Cnt + 1
##########################
W
| |
| SuzShook 2007-01-27, 11:39 pm |
| Thanks for putting me onto the right track, Willy - it's as simple as this:
# FileLocations
Locations = App.Do( Environment, 'ReturnFileLocations',)
TempName = Locations ['Temp'][0]
Have inserted that into the script, and it runs like a charm. Will post
shortly. Suz
Willy wrote:
> See if this will do it Suz.
>
>
> #####################
>
> from PSPApp import *
>
> def ScriptProperties():
> return {
> 'Author': u'',
> 'Copyright': u'',
> 'Description': u'',
> 'Host': u'Paint Shop Pro Photo',
> 'Host Version': u'11.11'
> }
>
> def Do(Environment):
>
>
>
> ListOfDirectories = ['Temp']
> DirInfo = App.Do( Environment, 'ReturnFileLocations',)
> # Print out all the directories for each location
> for DirName in ListOfDirectories:
> DirCntName = DirName + 'Num'
> DirCnt = DirInfo[ DirCntName ]
> print "\nNumber of directories defined for '", DirName, "' is ",
> DirCnt Cnt = 0
> while Cnt < DirCnt:
> location = DirInfo[ DirName ][ Cnt ] #var for there
> print location
> Cnt = Cnt + 1
>
> ##########################
>
> W
| |
| Spandex Rutabaga 2007-01-27, 11:39 pm |
| SuzShook wrote:
>
> Spandex Rutabaga wrote:
>
> I'm sure it would be better, Spandex. However, I cannot figure out how to
> extract that folder name from the system, and it's likely different for
> different users.
Doesn't %temp% return this folder name when the os module (or
sys or whatever it's called) is included. Simply typing %temp%
into the Windows > Start > Run box does the same thing.
| |
| SuzShook 2007-01-27, 11:39 pm |
| Spandex Rutabaga wrote:
> SuzShook wrote:
>
>
> Doesn't %temp% return this folder name when the os module (or
> sys or whatever it's called) is included. Simply typing %temp%
> into the Windows > Start > Run box does the same thing.
Got it, Spandex, from ReturnFileLocations command. Suz
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|