We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi quirekey,
I crop an image with imagemagick command line: convert 552def3c7b88432e7b88218028efa97e.jpg -crop 225x225+105+32 output.jpg
I got a square image with size: 225*225
But with the same image file, when I use this library to crop an image with following go code:
cropStr := fmt.Sprintf("%dx%d+%d+%d", w, h, x, y) fmt.Println("crop string is:" + cropStr) image.Crop(cropStr) fmt.Println("width is: " + strconv.Itoa(image.Width())) fmt.Println("height is: " + strconv.Itoa(image.Height()))
Then I got a rectangle image, not a square image.
The output is:
crop string is:225x225+105+32 width is: 225 height is: 150
The text was updated successfully, but these errors were encountered:
I had the same problem. I fixed it by writing my geometry like so:
225x225!+105+32
From the imagemagick docs: widthxheight! Width and height emphatically given, original aspect ratio ignored.
http://www.imagemagick.org/script/command-line-processing.php#geometry
I agree that this is surprising though given how convert works.
Sorry, something went wrong.
No branches or pull requests
Hi quirekey,
I crop an image with imagemagick command line:
convert 552def3c7b88432e7b88218028efa97e.jpg -crop 225x225+105+32 output.jpg
I got a square image with size: 225*225
But with the same image file, when I use this library to crop an image with following go code:
Then I got a rectangle image, not a square image.
The output is:
The text was updated successfully, but these errors were encountered: