NEW! PaintShop Pro 2019

Luminosity Scripts - Revised 04/20/2017

Moderator: Kathy_9

Luminosity Scripts - Revised 04/20/2017

Postby csh2000 » Fri May 27, 2016 7:35 am

I have created some luminosity scripts for PaintShop Pro. They were created and tested
in PSP X8, but should work with older versions without issue.

Update - These scripts store the masks in the alpha channels. Also included in the zip file is a script to facilitate creating a mask layer from any selection in the alpha channel

The creation of these scripts and the naming of the alpha channels are based on the
PhotoShop tutorials provided by Tony Kuyper. To understand how to use luminosity masks,
you should visit his website at http://goodlight.us/writing/luminositym ... sks-1.html

The luminosity scripts are a series of four scripts which create luminosity masks in
PaintShop Pro. The 'Lights' and 'Darks' scripts can be run independently if those are the
only the masks that you need. Alternatively, you can run 'Luminosity All Masks.PspScript'
to run all three scripts at one time..

These scripts should be installed in your Scripts-Restricted folder. For ease of use, I place
mine in a separate sub-folder called Scripts-Restricted\Luminosity Masks\.

Luminosity Lights.PspScript - Generate light luminosity masks
Lights, Lighter Lights, Bright Lights, Super Lights and Ultra Lights

Luminosity Darks.PspScript - Generate dark luminosity masks
Darks, Darker Darks, Shadow Darks, Super Darks, Ultra Darks

Luminosity Mid-tones.PspScript - Generate mid-tones luminosity masks based on 'Lights' and 'Darks'
Basic Mid-tones, Expanded Mid-tones, Wide Mid-tones, Super Mid-tones

Luminosity All Masks.PspScript - Runs all three scripts
(Luminosity Lights, Luminosity Darks and Luminosity Mid-Tones)

I have tested these on two different systems and have not experienced any issues. If you have issues with
these scripts or suggestions for improvements, please leave me a comment and I'll do my best to respond.
Last edited by csh2000 on Fri Apr 21, 2017 7:38 am, edited 4 times in total.
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Masking Scripts

Postby Kathy_9 » Fri May 27, 2016 4:29 pm

It's very kind of you to share your work.
PSP2019 version 21.1.0.22 & PhotoMirage installed; PSPX thru PSP2018 owned but not installed

http://www.flickr.com/photos/37153430@N03/
Kathy_9
Moderator
 
Posts: 2148
Joined: Tue Nov 30, 2010 12:44 am
Location: USA
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: 8th Gen. Intel Core i7+ 8700 3.20 GHz
ram: 16GB
Video Card: NVIDIA GeForce RTX 2060 [6 GB GDDR6 dedicated]
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP EliteDisplay E243m 23.8-inch
Corel programs: PSPX4 ~2019; DrawX5; Painter 2018-19

Re: Luminosity Masking Scripts

Postby csh2000 » Fri Jun 03, 2016 1:38 am

I have updated the scripts with additional error checking as well as added two new scripts ('Dodge and Burn Layer' and 'Mask Layer from Alpha'). Instructions for each script are in comment section.
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Masking Scripts

Postby csh2000 » Tue Aug 16, 2016 3:59 am

I have updated the luminosity scripts. I was able double the speed of the three main scripts (Darks, Lights and Midtones) by turning the marquee off. The downside to this is that if you normally turn marquee off, then these scripts will turn the marquee back on when done as I can not find anyway to save previous setting.

Also, I changed the scripts to run in silent mode.

I modified scripts, please see latest update below.
Last edited by csh2000 on Fri Mar 31, 2017 7:27 am, edited 1 time in total.
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Masking Scripts

Postby Briansdad » Wed Sep 07, 2016 3:48 pm

This is fantastic! Just what I was looking for! I've been stymied by Luminosity Masks up to now. Thank you! :D
Briansdad
 
Posts: 34
Joined: Sat Oct 25, 2014 1:54 am
Location: Midcoast Maine
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 4gig
Hard_Drive_Capacity: 3TB
Corel programs: PSPX9, AfterShotPro 3, VSX9

Re: Luminosity Masking Scripts

Postby Briansdad » Wed Sep 07, 2016 4:16 pm

Oh, no! :( I expected the masks to appear as layers after running the scripts (Paintshop Pro X9, SP1). I watched as the script created them and as they disappeared when the next was created. In the end, I had no masks, just the original image. What have I done wrong?

Bill
Briansdad
 
Posts: 34
Joined: Sat Oct 25, 2014 1:54 am
Location: Midcoast Maine
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 4gig
Hard_Drive_Capacity: 3TB
Corel programs: PSPX9, AfterShotPro 3, VSX9

Re: Luminosity Masking Scripts

Postby csh2000 » Wed Sep 07, 2016 4:25 pm

Briansdad wrote:Oh, no! :( I expected the masks to appear as layers after running the scripts (Paintshop Pro X9, SP1). I watched as the script created them and as they disappeared when the next was created. In the end, I had no masks, just the original image. What have I done wrong?

Bill


Bill - The scripts save the data in the Alpha channel. It's easy to create a mask or selection from the Alpha channel. In the zip file, there is also a script "Mask Layer from Alpha" which helps facilitate this task. Let me know if you have other questions. I do not have PSPX9, but they should work fine there. as well.
Chip
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Masking Scripts

Postby Briansdad » Wed Sep 07, 2016 4:30 pm

Oh, found them in the alpha channel (running the alpha channel script). :) Have I got the gist of it now?

Bill

PS: This should be part of the Paintshop Pro packaged program!
Briansdad
 
Posts: 34
Joined: Sat Oct 25, 2014 1:54 am
Location: Midcoast Maine
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 4gig
Hard_Drive_Capacity: 3TB
Corel programs: PSPX9, AfterShotPro 3, VSX9

Re: Luminosity Masking Scripts

Postby kenh » Sat Jan 28, 2017 6:41 pm

Thanks for sharing the scripts, I have been thinking about trying to do this for a while.
kenh
 
Posts: 22
Joined: Wed May 11, 2011 3:08 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
processor: AMD Phenom II
ram: 8GB
Video Card: ATI Radeon HD5570
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: Hanspree

Re: Luminosity Masking Scripts

Postby cosmicDread » Thu Mar 16, 2017 3:43 pm

Thanks for sharing. I put an interface on the masks code and added an HSL driver:

viewtopic.php?f=104&t=61441

Charles B.
Smooth the rough spots, soften the edges, reflect the light. This is art, no wait, life.
cosmicDread
 
Posts: 28
Joined: Fri Aug 26, 2016 7:10 am
Location: Lake Havasu City, Arizona
operating_system: Windows 7 Ultimate
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Sabertooth X79 LGA 2011 Intel X79
processor: Intel Core i7-3930K
ram: 32 GB
Video Card: GeForce GTX 1080 Ti
Hard_Drive_Capacity: 5 TB
Monitor/Display Make & Model: Acer Predator X34
Corel programs: PaintShop X5, X6, X8, X9, '18, '19

Re: Luminosity Scripts

Postby csh2000 » Fri Mar 31, 2017 7:26 am

I've updated the luminosity scripts to fix a minor error and removed the requirement that these scripts be run on a raster layer. I've also added a few more scripts that I use for my photography. Install these in your "Restricted" folder.

Luminosity Lights.PspScript
- Generate light luminosity masks in Alpha Channel

Luminosity Darks.PspScript
- Generate dark luminosity masks in Alpha Channel

Luminosity Mid-tones.PspScript
- Generate mid-tones luminosity masks in Alpha Channel

Luminosity All Masks.PspScript
- Runs all three scripts (Luminosity Lights, Luminosity Darks and Luminosity Mid-Tones)

Load Mask From Alpha Channel.PspScript
- Runs 'Layers'| 'Load Mask From Alpha Channel' then renames mask layer to Alpha Channel selected.

Copy All Alpha Channels to Group.PspScript
- Create grey scale representation of all masks in the Alpha channel. This helps with visualization (opposed to small preview window). Use caution when creating as this could take a significant amount of time to create.

Copy Alpha Channel to Layer.PspScript
- Create grey scale representation of a single mask in the Alpha channel. This helps with visualization (opposed to small preview window). Also can be used to modify
image by layer blend modes. Try using 'Lighten' with Dark or mid-tone luminosity mask to lighten a dark image.

Select Brights From Image.PspScript
- Create Selection based on brightness of image. This is same luminosity selection as "Create Mask from Image".

Select Darks From Image.PspScript
- Create Selection based on darkness of image. This is same luminosity selection as "Create Mask from Image" (inverted).

File removed - See next post for revised scripts.
Last edited by csh2000 on Fri Apr 21, 2017 7:27 am, edited 1 time in total.
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Scripts

Postby csh2000 » Fri Apr 21, 2017 7:24 am

I've tweaked the Luminosity Darks and Luminosity Lights scripts to gain additional performance over previous version. I found that I could use the existing data already in the Alpha Channels to build the new masks rather than duplicating and merging masks. This doubled the speed of each of the individual scripts (Lights and Darks). When running all three scripts there is only a 40% overall improvement as I have not found a way to speed up the mid-tone script.

I am attaching all the scripts below:
Last edited by csh2000 on Sun Nov 19, 2017 6:57 pm, edited 1 time in total.
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9

Re: Luminosity Scripts - Revised 04/20/2017

Postby csh2000 » Sun Nov 19, 2017 6:56 pm

I have updated the luminosity scripts to note that these scripts are now freely redistributed for non-commercial purposes only. I do ask that if you modify or reuse this code that you would please attribute original works to me. After nearly 18 years, I no longer use PSP and will not be creating nor updating any of my past scripts. I have enjoyed this community and have learned much from the community (especially Levi and Cassel).
Attachments
Luminosity Scripts.zip
Revised Luminosity Scripts
(16.39 KiB) Downloaded 189 times
csh2000
 
Posts: 52
Joined: Mon Mar 31, 2014 3:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i7-6500U CPU 2.50GHz
ram: 12GB
Hard_Drive_Capacity: 1TB
Corel programs: PSP X9, Aftershot Pro 3, VideoStudio X9


Return to PSP Scripting

Who is online

Users browsing this forum: No registered users and 1 guest