I have a whole bunch of images that are 1920x1080 in size. The subject of each image is centered in the middle and is only about 500 pixels wide.
I would like to crop all of the images to 500x1080; starting at 710-0 and extending to 1210-1080; in other words, just keep the middle 500 horizontal pixels.
Is there a way to do this using the Batch Processing feature? Or some other way?
TIA.
-WVMontani
Batch Process Cropping
Moderator: Kathy_9
-
Andy2011
- Posts: 115
- Joined: Sun Sep 22, 2019 4:26 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Gigabyte A520M S2H
- processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
- ram: 16 GB
- Video Card: Integrated Radeon Vega GPU
- sound_card: on board
- Hard_Drive_Capacity: 2500 GB
- Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
- Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
- Location: UK
Re: Batch Process Cropping
I suggest recording a macro (script) which can then be used in batch mode.
The process to get the script is
With the batch process, select the photos, under batch actions, choose 'Script' and select the newly saved recording script (e.g. crop-500). The output setting lets you rename the pictures.
I have done a quick test and it worked for me, so good luck!
Scripts are quite flexible and, if you know Python, you can write them to apply changes (e.g. crop size and position) based on information in the original photo such as original width and height.
The process to get the script is
- load a typical photo
select 'crop' then adjust the selection to what you want (but don't activate the crop at this point)
click on the macro record command (either red button on the tool bar, if shown, or File/Script/Start Recording)
click on the tick symbol to complete the crop
click on Save Recording (or File/Script/Save Recording) and give it a suitable name e.g. crop-500
With the batch process, select the photos, under batch actions, choose 'Script' and select the newly saved recording script (e.g. crop-500). The output setting lets you rename the pictures.
I have done a quick test and it worked for me, so good luck!
Scripts are quite flexible and, if you know Python, you can write them to apply changes (e.g. crop size and position) based on information in the original photo such as original width and height.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Re: Batch Process Cropping
OK, that worked but two of your instructions were in the wrong order.
I have to start recording the script BEFORE I make my selection; not after making the selection. Then I click on the tick symbol to complete the crop. Then save the recording.
Thank you very much!
-WVMontani
I have to start recording the script BEFORE I make my selection; not after making the selection. Then I click on the tick symbol to complete the crop. Then save the recording.
Thank you very much!
-WVMontani
-
Andy2011
- Posts: 115
- Joined: Sun Sep 22, 2019 4:26 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Gigabyte A520M S2H
- processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
- ram: 16 GB
- Video Card: Integrated Radeon Vega GPU
- sound_card: on board
- Hard_Drive_Capacity: 2500 GB
- Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
- Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
- Location: UK
Re: Batch Process Cropping
I understand what you are saying but that's not my experience. The script only remembers the settings of the crop tool at the time of executiong the command, not the way you get there. The key part of the script is:WVMontani wrote:OK, that worked but two of your instructions were in the wrong order.
I have to start recording the script BEFORE I make my selection; not after making the selection. Then I click on the tick symbol to complete the crop. Then save the recording.
Thank you very much!
-WVMontani
Code: Select all
# Crop
App.Do( Environment, 'Crop', {
'CropRect': ((710,0), 500, 1080),
'Mode': App.Constants.CropMode.Custom,
'Units': App.Constants.CropUnits.Centimeters,
'SelectedArea': False,
'PrintWidth': -1,
'PrintHeight': -1,
'CropAsNewImage': False,
'RotationAngle': -0,
'AutoFit': False,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((22,0,0),1)
}
})
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
