avalanche123/Imagine — pull request #344 by mranawake (2014-07-10 15:03:07+00:00)
Title: Update Image.php

I have a legit/production use case where a user can upload an image, resize, rotate and position (by panning) it in a predefined editor area. If I use native ImageMagic functions, I can successfully render the image even if the user places the image right near the border of editor area (this will generate an image with the size of my edit area, mostly black or transparent [depending on save format] as there is no image there, and on a side, user's uploaded image).

My app (and future potential apps) will need this functionality, where you can paste things even if it is out of bounds. With Imagine, it is not possible as it throws "OutOfBoundsException" exception in "paste" function.

Solution was to add a 3rd preference parameter so the developer can decide if it is okay to paste out of bound. Default case is to throw the exception. I think this is a useful feature.

Please note that I only changed on "/Imagick/Image.php". Potentially I can help with porting this change to other library specific files. Thanks.