Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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
share|improve this question
    
Tutorial here. –  hhh Jun 9 '12 at 0:33

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.