Defect in Scrip API Documentation (Crop)

Moderator: Kathy_9

Post Reply
Posts: 100
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 10
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

Defect in Scrip API Documentation (Crop)

Post by Andy2011 »

I think there is a defect in the Corel documentation of the Crop API. The doc quotes the default crop rectangle as
Left 0.0 Right 0.0 Top 0.0 Bottom 0.0
but a saved script has the arguments of e.g.

Code: Select all

'CropRect': ((710,20), 500, 700), 
which looks like top left position as a tuple followed by width and height.
Worst still, using the 4 arguments crashed my PSP2020. Restarting produced an error message in the Script Output window
TypeError: function takes at most 3 arguments (4 given)
Not the biggest trouble with PSP but information might help if debugging a script.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
Post Reply