Resize in scripts fails to set resolution
Moderator: Kathy_9
-
- Posts: 18
- Joined: Fri Sep 23, 2016 10:53 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Resize in scripts fails to set resolution
I have made a few tests with recording scripts and I noticed an error with resizing in PSP 2022. When I manually set the resolution (like 300 DPI), this is correctly recorded in the script. But when I run the script, it sets the resolution to 100 DPI every time. When I do there same action manually, it works though. Is this a known error? Is there a fix?
-
- Advisor
- Posts: 6774
- Joined: Thu Oct 02, 2008 1:07 pm
- 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: Resize in scripts fails to set resolution
Care to share the script or at least the portion that does the resize? I just recorded a script that resizes the resolution without issue. Seeing the settings might help determine what's going on.
How I recorded my script is as follows: 1) hit record, 2) Open Resize 3) Go to the "By Print Size" option and set my resolution and then go to "By percent" and set the percentage to 100. So it's not actually resizing the image, it's just changing the resolution.
How I recorded my script is as follows: 1) hit record, 2) Open Resize 3) Go to the "By Print Size" option and set my resolution and then go to "By percent" and set the percentage to 100. So it's not actually resizing the image, it's just changing the resolution.
-
- Posts: 18
- Joined: Fri Sep 23, 2016 10:53 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Resize in scripts fails to set resolution
Basically that's what I did, too. I only want the reolution to be 300 DPI, so when I insert text in the next step, it has always the same size. I am pretty sure it worked with PSP2020 as I never had this issue before 2022. Also, as the settings are saved in the "resize" window, I can see that it resets the resolution to 100 DPI.
This is part of the script:
This is part of the script:
Code: Select all
App.Do( Environment, 'Resize', {
'AspectRatio': 1,
'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels,
'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn,
'Height': 1920,
'MaintainAspectRatio': True,
'Resample': True,
'ResampleType': 1,
'ResizeAllLayers': True,
'Resolution': 300,
'Width': 1920,
'SharpnessValue': 50,
'AdvancedMode': True,
'ResizeType': 2,
'OneSide_Type': 1,
'OneSide_LongWidth': 1920,
'OneSide_ShortHeight': 1920,
'OneSide_Unit': App.Constants.UnitsOfMeasure.Pixels,
'OneSide_Active': 0,
'Noise_Level': 0,
'Noise_Slider': 0,
'MODEL': 0,
'Enable_GPU': False,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((24,0,0),1)
}
})
-
- Posts: 2774
- Joined: Fri Mar 28, 2008 10:04 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: LENOVO 4524PE4 ThinkCentre M91p
- processor: 3.10 gigahertz Intel Quad Core i5-2400
- ram: 8 GB
- Hard_Drive_Capacity: 4.6 TB
- Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
- Location: Canada
Re: Resize in scripts fails to set resolution
Just for accuracy, PSP does not have an option to change DPI (Dots Per Inch) because that is a function of the printer only and its associated software/driver. Graphic programs can only adjust the PPI (Pixels Per Inch) of an image. Attached is an image of the Resize dialogue in PSP - not Dots Per Inch, only Pixels Per Inch.Elchinator wrote: ↑Fri Jun 24, 2022 6:18 pm I have made a few tests with recording scripts and I noticed an error with resizing in PSP 2022. When I manually set the resolution (like 300 DPI)....
You do not have the required permissions to view the files attached to this post.
Regards,
JoeB
Using PSP 2019 64bit
JoeB
Using PSP 2019 64bit
-
- Advisor
- Posts: 6774
- Joined: Thu Oct 02, 2008 1:07 pm
- 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: Resize in scripts fails to set resolution
Your Resize Type is set to 2 meaning you accepted a print size. Annoyingly, order of operations is very important in this case, you need to set the Resolution first, then go to the percentage option (Resize Type 1) and set the width and height to 100. It'll accept the new resolution and setting it to 100% means it won't do any edit. But you have to be on "By Percentage" when you hit OK.
To edit the code so you don't have to re-record the steps just change the following parameters
If I am correct that will be the equivalent of resizing to 100% with a new resolution of 300.
To edit the code so you don't have to re-record the steps just change the following parameters
Code: Select all
'Width': 100
'Height': 100
'ResizeType': 1
-
- Posts: 18
- Joined: Fri Sep 23, 2016 10:53 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Resize in scripts fails to set resolution
Thanks, that helped! The resolution is now correct.