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
import a image that is exactly 200x200
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: import a image that is exactly 200x200
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
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
It is larger than 200x200, Thanks for helping!
Zhengquan
Zhengquan