LeviFiction wrote:The resize command has an option to resize by one side, the longest or shortest. Add that to the batch to do the resize.
Hmm, where is this option in the resize dialog? I don't find it (see attached snapshot).
If I have to add it manually in script text file: How should the full command look like?
LeviFiction wrote:
Otherwise to do this in a script you need an if else statement and need to use the variables App.TargetDocument.Width and App.TargetDocument.Height
Sorry, I am a PSP scripting newbie:
How would such an if-else command look like in detail?
The following does not work:
If App.TargetDocument.Width > App.TargetDocument.Height (
App.Do( Environment, 'Resize', {
'AspectRatio': 1.33333,
'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels,
'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn,
'Height': 1440,
'MaintainAspectRatio': True,
'Resample': True,
'ResampleType': App.Constants.ResampleType.Bicubic,
'ResizeAllLayers': True,
'Resolution': 300,
'Width': 1920,
'SharpnessValue': 50,
'AdvancedMode': True,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((12,0,1),1)
}
})
) else (
App.Do( Environment, 'Resize', {
'AspectRatio': 1.33333,
'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels,
'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn,
'Height': 1920,
'MaintainAspectRatio': True,
'Resample': True,
'ResampleType': App.Constants.ResampleType.Bicubic,
'ResizeAllLayers': True,
'Resolution': 300,
'Width': 1440,
'SharpnessValue': 50,
'AdvancedMode': True,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((12,0,1),1)
}
})
)