Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to resize an Image using Image Megic Magic Magick in C# ?
Posted
Updated 24-Jun-13 22:20pm
v4
Comments
Rajesh Anuhya 25-Jun-13 0:41am    
Not clear , can explain bit more..
[no name] 25-Jun-13 0:46am    
I want to resize a large image i.e(1500x1200) to 450x450 using ImageMegic(Third Party tool) in C#
Console Application.
Sergey Alexandrovich Kryukov 25-Jun-13 1:48am    
Do you mean resample? or crop? what's the problem? ImageMagic provides comprehensive documentation.
—SA
[no name] 25-Jun-13 2:36am    
i just want to resize the image not crop or resample corp will cut the image but i dont want to cut the image i want to make the size smaller or bigger.
Sergey Alexandrovich Kryukov 25-Jun-13 7:38am    
This is "resampling"...
—SA

The answer really depends on whether or not you are using the command line or a wrapper to do the resizing. If you are using the command line version, then call convert.exe sourcefilename -resize 450x450 outputfilename. If you want to do this through a third party wrapper, you are going to have to read the documentation for that wrapper.

You can find out more about resizing with ImageMagick in the rather comprehensive documentation[^].
 
Share this answer
 
Comments
[no name] 25-Jun-13 5:38am    
Thanks for help.
Yes i am using command line but when i resize image by using Convert.exe E:\Sourceimg.jpg
-resize 450x450 E:\Outimg.jpg then i gettimg 450x291 as image size i dont know why
Please help me to get 450x450 image size.
Pete O'Hanlon 25-Jun-13 5:44am    
Did you read the documentation page I linked to? The reason you are seeing odd sizes is because it's preserving the aspect ratio. In order to ignore the aspect ratio, put ! at the end of the size (e.g. 450x450!).
[no name] 25-Jun-13 5:51am    
Thank you so much.I got the desires output.
Thanks.................
Sergey Alexandrovich Kryukov 25-Jun-13 7:39am    
Sure, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900