: How to resize Images with ImageMagick? Explain this odd behaviour I am puzzled by this combo, I use convert -command to change the size to 55x55 but I get 54x55, why? I think the problem
I am puzzled by this combo, I use convert -command to change the size to 55x55 but I get 54x55, why? I think the problem here is that the command use geometry not pixels while I presupposed that the command uses pixels.
Trial 0: -resize not right flag
$ convert -resize 55x55 sky_0_1.png sky_0_11.png
$ identify sky_0_1*
sky_0_11.png PNG 54x55 54x55+0+0 8-bit DirectClass 3.54KB 0.000u 0:00.000
sky_0_1.png[1] PNG 59x60 59x60+0+0 8-bit DirectClass 4.12KB 0.000u 0:00.000
Trial 1: adaptive-resize not right flag
$ convert -adaptive-resize 55x55 sky_0_1.png sky_0_111.png
$ identify sky_0_111.png
sky_0_111.png PNG 54x55 54x55+0+0 8-bit DirectClass 3.6KB 0.000u 0:00.000
More posts by @Gloria351
1 Comments
Sorted by latest first Latest Oldest Best
I do not know what the resize -command really is for but you need to use crop -flag to get specific sized images. It cuts the image with it to four pieces, not sure about the best way to process it or adjust the crop but it basically works like below:
$ convert -crop 55x55 sky_0_1.png sky_0_1c.png
$ ls
sky0_0.png sky_0_11.png sky_0_1c-1.png sky_0_1c-3.png sky_0_2.png sky_0_4.png sky_0_6.png sky_0_111.png sky_0_1c-0.png sky_0_1c-2.png sky_0_1.png sky_0_3.png sky_0_5.png
$ feh sky_0_1c-*
$ feh sky_0_1c-0.png
$ identify sky_0_1c-0.png sky_0_1c-0.png PNG 55x55 59x60+0+0 8-bit DirectClass 3.85KB 0.000u 0:00.000
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.