Cropping Image
Posted: 2011-04-08T04:05:07-07:00
Hi Guys,
Apologies if this is simple, but I'm trying to call ImageMagick from a command line in VB (little irrelevant!)
I would like to crop the image, and save the image as the current file name. I'm assuming from the docs I need the -shave command line argument but here's where I think it gets complicated.
Some of my images are the correct size, and some are not. I would like ImageMagick to be able to take the sides from the image (i.e. make it 480 x 640) as long as it is a predefined image size (i.e. if it's 1024 x 768 - then -shave - otherwise leave it alone!)
If you're still reading this, the application is for photo ID, and the webcam we're using (after switching) only takes landscape pics, and the end user wants portrait - as all of their current images are portrait... hence the need to not crop or shave their current images (which although they are portrait, they are of no fixed size) - therefore the only way of determining which is a new image is the dimensions of the image.
If you can help, thanks a million - and thanks for even just reading this far!
All the best,
Pete
Apologies if this is simple, but I'm trying to call ImageMagick from a command line in VB (little irrelevant!)
I would like to crop the image, and save the image as the current file name. I'm assuming from the docs I need the -shave command line argument but here's where I think it gets complicated.
Some of my images are the correct size, and some are not. I would like ImageMagick to be able to take the sides from the image (i.e. make it 480 x 640) as long as it is a predefined image size (i.e. if it's 1024 x 768 - then -shave - otherwise leave it alone!)
If you're still reading this, the application is for photo ID, and the webcam we're using (after switching) only takes landscape pics, and the end user wants portrait - as all of their current images are portrait... hence the need to not crop or shave their current images (which although they are portrait, they are of no fixed size) - therefore the only way of determining which is a new image is the dimensions of the image.
If you can help, thanks a million - and thanks for even just reading this far!
All the best,
Pete