Page 1 of 1

import a image that is exactly 200x200

Posted: 2009-04-08T08:28:21-07:00
by zhengquan
Dear Imagemagick community,

I have got a task that needs me to do a screenshot of an interface of a
software a lot of times. it requires the screenshot to be 200x200 in size.

I tried
import -geometry 200x200 test.png

but it does not work, and I read import man page and can not figure out
which switch to use.

I wonder if this can be done using import alone and if possible I can
use it with other tools in linux.

Besides, the imagemagick mailing list seems to have closed subscription? I tried several times but got no replies.

Thanks for any pointers,
Zhengquan

Re: import a image that is exactly 200x200

Posted: 2009-04-08T10:31:27-07:00
by fmw42
How big is the window? Are you importing an image that is bigger and want it to be resized to 200x200 or is the window with the image 200x200 already.

If the image is larger than 200x200, then you either need to resize it or specify a subsection.

For the subsection:

try

import -crop 200x200+0+0 +repage test.png

to get the top left corner. Or if you want the center, then

import -gravity center -crop 200x200+0+0 +repage test.png

If it is larger and needs resizing, try

import -resize 200x200! test.png


See
http://www.imagemagick.org/script/import.php
http://www.imagemagick.org/Usage/basics/#import

Re: import a image that is exactly 200x200

Posted: 2009-04-09T07:59:24-07:00
by zhengquan
It is larger than 200x200, Thanks for helping!

Zhengquan