Skip to content
Advertisement

How to crop corners of a 1000×1000 picture

I’m trying to crop a picture to 1000 by 1000 pixels. It works to crop the far left of the picture.

JavaScript

However, if I attempt to change the crop to the far right it returns an error:

SystemError: tile cannot extend outside image

JavaScript

Advertisement

Answer

As the comments and the documentation pointed out, parameters should be supplied in the form of (left, upper, right, lower).

In your case, this translates to (width - 1000, height - 1000, width, height)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement