Hi, I'm newer in IM , but i have some problem
I use ImageMagick 6.3.1
OS: MICROSOFT WINDOWS XP Prof
WEb server: Apache/1.3.9
PHP: php v5.0.5
Problem: When I run this command
convert someDirectory\image.jpg -crop x246 -resize 182x246! otherDirectory\image.jpg
from php exec() it split image to 2 or more images.
I can not find problem why it split ???
result image must be 1.
problem with images
Re: problem with images
Try -crop x246+0+0 +repage
Re: problem with images
magick wrote: Try -crop x246+0+0 +repage
Thanks, but I need that images size will equal 182x246
Re: problem with images
You are not using the crop function correctly farish.
As I understand it
-crop x246 is cropping the image into 246 wide parts so if the image is 2460 wide you will get 10 images.
You want
-crop x246+0+0 which will crop the image once into a piece 246 wide with in this case the top left of the crop located at the top left of the original picture.
Check out Anthony's examples http://www.imagemagick.org/Usage/
As I understand it
-crop x246 is cropping the image into 246 wide parts so if the image is 2460 wide you will get 10 images.
You want
-crop x246+0+0 which will crop the image once into a piece 246 wide with in this case the top left of the crop located at the top left of the original picture.
Check out Anthony's examples http://www.imagemagick.org/Usage/
Re: problem with images
Try the code below!! Hope it works for you!!!!
You will get the image of your size cropped from the position (0,0) ie; (top-left part of your image).
Code: Select all
convert -crop 182x246+0+0 "thisfolder/img.jpg" "otherfolder/reimg.jpg"
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: problem with images
You can also use -path to sepcify a different output directory for images being saved to disk. This is especially useful with "montage".
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/