Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore OutOfBoundsException error when watermark grower of source image #51

Open
yii-bot opened this issue Aug 6, 2018 · 1 comment
Labels
ext:imagine status:ready for adoption Feel free to implement this issue.

Comments

@yii-bot
Copy link

yii-bot commented Aug 6, 2018

This issue has originally been reported by @NabiKAZ at yiisoft/yii2#16612.
Moved here by @samdark.


When use this command:

Image::watermark('image.jpg', 'watermark.jpg')->save('image.jpg');

If dimension of watermark, grower of source image, return this error:

Exception 'Imagine\Exception\OutOfBoundsException' with message 'Cannot paste image of the given size at the specified position, as it moves outside of the current image's box' 

It's fine. But how can ignore this error, so new image will be create but the part of watermark that outside of the image box is hidden and removed.

@rob006
Copy link

rob006 commented Aug 7, 2018

Related: https://stackoverflow.com/questions/51698580/ignore-outofboundsexception-error-when-watermark-grower-of-source-image

This could be fixed by automatically cropping/resizing watermark in such cases.

@samdark samdark added the status:ready for adoption Feel free to implement this issue. label Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext:imagine status:ready for adoption Feel free to implement this issue.
Projects
None yet
Development

No branches or pull requests

3 participants