Batch Resizing of images

Moderator: Kathy_9

Post Reply
Phil47
Posts: 109
Joined: Thu Feb 25, 2010 12:59 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Z170-P DDR 4
processor: i-5 6600K OC
ram: 8GB
Video Card: GTX960
sound_card: Realtek High Definition Audio
Hard_Drive_Capacity: 500GB
Monitor/Display Make & Model: Asus MX279
Corel programs: PSP X6 PSP X9 PSP 2018

Batch Resizing of images

Post by Phil47 »

Hi. First I tried the "Help" tab. Then I did a search here and came up with several answers prior to Jan 2010 when PSPPx3 came out that said Corel does not include this rather basic function in its software - you have to go to Infraview to get that.

Is that correct?

All I want to do is batch resize several images, say 10, to send via email. How exasperatingly tedious is doing resizing one by one for ten images let alone dozens???

Thanks,

Phil.
Tell the truth....but gently.

Phil.
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 Resizing of images

Post by LeviFiction »

Well, it's true that PSP does not natively support resizing in its batch processor. But that doesn't mean it's incapable of resizing while doing the batch processing.

Paint Shop Pro allows you to run a script on all images that it's processing, so it is possible to use a resizing script in the batch processor to handle resizing for you.

As for how tedious, it's only slightly tedious for 10 images. Learning the short-cut keys and helps and knowing the maximum size you want to resize the images to is also nice. Doing it manually you get to decide if you want certain images to be slightly larger as well so that's nice.

Fun fact, though. If you Paint Shop Pro's built-in email functions you can go ahead and open all of the images you want to email right into paint shop pro. Then go to File->Email->All Active Images.

This will open up the settings for sending the images as email attachments. You go ahead and select a maximum photo size in pixels and Paint Shop Pro will go ahead and do a batch resize and then open your default mail client and attach the photos to an email from there for you.

Sadly that functionality is only available in an actual desktop email client like Outlook, Windows Mail, and Thunderbird. There are others it will work with but those are the only ones I've tested it with.
https://levifiction.wordpress.com/
df
Posts: 1224
Joined: Mon Feb 08, 2010 11:21 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: GIGABYTE Z690 AERO G DDR4
processor: 13th Gen Intel Core i7-13700K
ram: 64gb
Video Card: RTX 3060 Ti 8gb GDRR6
Hard_Drive_Capacity: 1 Tb
Location: Washington State
Contact:

Re: Batch Resizing of images

Post by df »

To create a script as Levi points out in the first part of his post it's nice to start with having the script toolbar visible. Click View> Toolbars> Script. If that hides something then press it again and it will come back right where it was in the first place:

Open an image
On the script toolbar click the Start Recording Script button (big red dot)
Now click Edit> Copy Special> Copy for Screen or Email
Now click Edit> Paste as New Layer
Now select the base layer on the layers palette (F8 if not visible)
Delete base layer
Now click Layer> New Mask Layer> From Image. The dialog box will appear, choose Any non-zero value, click OK
Now click Selection> From Mask
Now click Image> Crop to Selection
Now click the Save Script button (looks like a floppy disk)
Name your script, make sure that you check the Remove Undone Commands button and the Save Positions button (in case you screwed up and had to undo), and you're done.

So yeah, it's easier in other programs but it is possible.

Side note, this works here because of the command Copy for Screen or Email. Any other resizing that I know of screws up when you try to use a landscape image that was recorded for a portrait image or vice versa. You wind up with either a squished or stretched image, even though you had the Lock Aspect Ratio button checked checked when you recorded the script. Seems to me like Corel should look into that :roll: :| :roll:


Edit: So now that you have your script written you'd go to File> Batch Process
In the Batch Process dialog box you'd click Browse to find your files.
Check Use script, then choose your script.
Under Save mode I'd use New Type (you could overwrite but I never do that, ever)
Under type and folder you can figure that out, then click the Start button beside your list of files.

Try a small batch first to make sure it's running right.
Regards, Dan

"Smoke me a kipper, I'll be back for breakfast."
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 Resizing of images

Post by LeviFiction »

I would agree with you that Corel needs to look into that, but only in the case of auto-rotate. We should be able to turn auto-rotate off for images. I mean that's what the problem is with photos shot for portrait and we try to resize based on original resize settings.

But that is why you see all of these resize scripts using python to determine the best action for resizing. Boznian2's script for example has that wonderful little equation to determine the size of each side of the image while maintaining the aspect ratio. With a small edit you could even make it ask for the maximum size you want it to use. Though that could get very annoying in a batch process run.

You know, df, I never would have considered such an interesting method. Here's what I was thinking, it's not any shorter than your own but does require the user to actually edit the script in one small way.

My idea starts out the same way.

1) Hit Record on the script toolbar

2) Edit->Copy Special->Copy for Screen or Email

3) Edit->Past As New Selection

4) Just drop the image anywhere it doesn't matter, I'll show you why soon.

5) Image -> Crop to Selection

6) Save Script

7) Select script and hit the "Edit Selected Script" button. It's the one that looks like a scroll and quill next to the play button.

8 ) Hit "Text Editor" and Notepad should open up. Look for "PastAsNewSelection" and you should see an option that says "offset( ##, ##)" change those numbers to 0,0 so "offset(0,0)" and save the script. With the offset set to 0,0 it will paste to the exact center of the canvas.

Now the script will copy to a low resolution, paste it at the default center of the canvas and crop to the new selection. Quick, easy, and no problem.
https://levifiction.wordpress.com/
Post Reply