You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same question here.
I want to crop an image below and above, same pixels in both sides. For this, I calc $positionY = ($finalHeigh - $originalImageHeight) / 2) and the result value is always negative. So, Imagine Point class returns an Exception.
There are a reason to not allowing negative values in Point class?
Thanks!
There is another class, equivalent to Point class, that allows negative values. Imagine\Image\PointSigned
It works.
Anyway, I would like to understand why Point doesn't allow negative values.
Issue description
The Imagine Point class constrains point values to be positive (vis
Why is this? Is there a work-around for positioning drawn or pasted image objects so that they are partially placed outside of an image area?
If you disable the constraint, it appears that Imagine continues to work OK with negative values.
What version of Imagine are you using?
1.3.2
What's the PHP version you are using?
8.0.25
What's the imaging library you are using [gd/imagick/gmagick/any]?
GD2
What's the imaging library configuration
GD Version: "2.3.3"
FreeType Support: true
FreeType Linkage: "with freetype"
GIF Read Support: true
GIF Create Support: true
JPEG Support: true
PNG Support: true
WBMP Support: true
XPM Support: true
XBM Support: true
WebP Support: true
BMP Support: true
TGA Read Support: true
JIS-mapped Japanese Font Support: false
Minimal PHP code to reproduce the error:
n/a
The text was updated successfully, but these errors were encountered: