Resizing Images, Maintaining Ratio

Moderator: Kathy_9

Chrisiztopher
Posts: 2
Joined: Fri Nov 26, 2021 5:46 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Hard_Drive_Capacity: 1TB
Corel programs: PSP 2021

Resizing Images, Maintaining Ratio

Post by Chrisiztopher »

I have a simple script that Crops, Merges All Layers, then resizes to the Height of 400.
The images all have different raw sizes so maintaining the aspect ratio is vital.
It runs really well but I think it might be running thru the script faster than the program has time to maintain the raitio.

Code: Select all

# Resize
    App.Do( Environment, 'Resize', {
            'AspectRatio': 2.17273, 
            'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels, 
            'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn, 
            'Height': 400, 
            'MaintainAspectRatio': True, 
            'Resample': True, 
            'ResampleType': 6, 
            'ResizeAllLayers': True, 
            'Resolution': 72, 
            'Width': 
            'SharpnessValue': 50, 
            'AdvancedMode': True, 
            'ResizeType': 0, 
            'OneSide_Type': 0, 
            'OneSide_LongWidth': 3651, 
            'OneSide_ShortHeight': 1680, 
            '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.Interactive, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((23,0,0),1)
                }
            }) 
Thanks in advance.
Chrisiztopher
Posts: 2
Joined: Fri Nov 26, 2021 5:46 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Hard_Drive_Capacity: 1TB
Corel programs: PSP 2021

Re: Resizing Images, Maintaining Ratio

Post by Chrisiztopher »

I left Width blank on accident. It was an attempt to force the ratio instead of the number that was there (896,)