Batch script help please. Happy to pay for this work.

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
bdfoto
Posts: 20
Joined: Sun Mar 16, 2014 8:17 am
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit

Batch script help please. Happy to pay for this work.

Post by bdfoto »

I am looking for a programmer who is skilled in writing batch process software for Paint Shop Pro. I use version X8 at present.

I am happy to pay someone to do this work as this is a commercial requirement.

Please note that I am looking at this batch process primarily to deal with product photography on a plain pure white background. If you can make it work for "busier" images, that would be excellent, but is not a requirement.

The batch process should do the following:

1. Open any allowable image type;
2. Make a note of the original image dimensions in pixels;
3. Find the main subject of the image, check the width and height in pixels and precisely centre it;
4. Add or remove a border to recreate an image of exactly the same number of pixels as you started with;
5. Save with the original file name / file type;
6. Close the image file.

If you can suggest any other enhancements I would be very interested to hear your ideas.

Sample image

Image
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Batch script help please. Happy to pay for this work.

Post by LeviFiction »

Can you guarantee the background will be sufficiently flat like the example image above?

If you can do that then I imagine the solution would be easy. Of course with only that one image to test it on I can't be 100% confident. But I think it would be easy enough. Here's my first try.

Script: https://drive.google.com/open?id=0B8FlF ... XNVc0s5OVU
Video: https://drive.google.com/file/d/0B8FlFL ... htZkk/view

In the video I first demonstrate on two different versions of the glasses image above. Using the regular Run Script option. Then I demonstrate going through the Batch Process option for doing both images at the same time and the settings to make sure they're simply overwriting the originals. (Not recommended until you're sure the script works properly otherwise you lose the image if the script fails). To use the script simply download the zip file and unzip the script into the Scripts-restricted folder.

The Process used in the script is simple:
1) Select the top left corner pixel with the magic wand tool to select the entire white background
2) Invert the selection
3) Convert selection to rectangle
4) Crop to selection
5) Canvas Size command ( set to the original size and centered, which PSP does the centering automatically)

Done

You'll want to properly test on several images that are sufficiently different from each other to see if this method works for you.
https://levifiction.wordpress.com/
bdfoto
Posts: 20
Joined: Sun Mar 16, 2014 8:17 am
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit

Re: Batch script help please. Happy to pay for this work.

Post by bdfoto »

Thank you. I'll give that a try. I really appreciate your help.
bdfoto
Posts: 20
Joined: Sun Mar 16, 2014 8:17 am
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit

Re: Batch script help please. Happy to pay for this work.

Post by bdfoto »

Looks good. Just need to tweak the borders in canvas size.

Thank you.
bdfoto
Posts: 20
Joined: Sun Mar 16, 2014 8:17 am
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit

Re: Batch script help please. Happy to pay for this work.

Post by bdfoto »

Everything's fine except I end up with very harsh shadows. I need to keep the graduation in the shadows. Any suggestions please?
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Batch script help please. Happy to pay for this work.

Post by LeviFiction »

Well, as I said my script only works if you can guarantee a completely flat background. Can you show an example of the problem image?
https://levifiction.wordpress.com/
bdfoto
Posts: 20
Joined: Sun Mar 16, 2014 8:17 am
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit

Re: Batch script help please. Happy to pay for this work.

Post by bdfoto »

Thank you. I have come up with a solution for now.

It's that bit with the shadow I have put out to a clipper for now and I'll return to this in a few days.
Post Reply