Magick.net: What is the equivalent in Magick.net (Resize and Crop)

Created on 10 May 2017  路  7Comments  路  Source: dlemstra/Magick.NET

Dim img As New ImageMagickObject.MagickImage
Call img.Convert("-resize", "390x", "-crop", "390x590+0+0", sourceImg, sourceImg)

I am currently using imageMagick com object and the above code. What would be the equivalent in Magick.net

Thanks

question

Most helpful comment

You will need to specify the geometry argument.

All 7 comments

That command would translate to this:

C# using (MagickImage image = new MagickImage(sourceImg)) { image.Resize(390, 0); image.Crop(390, 590); image.Write(sourceImg); }

Ok. thanks.

How to change the crop position? It lookslike it starts from center of the image.

You will need to specify the geometry argument.

Hi,
How can I change the quality of resize image?
It is different with the image that I resized with the command line.

Thanks!

@erickao08 Is your question related to this post or are you executing a whole different command?

@dlemstra
Yes, my question is related to this post. I can open another issue if you prefer that way.

I was able to use Resize() in c# to resize my image but the quality is bad; however when I used "convert input.jpg -resize 135 output.jpg" in cmd the quality is great. I am wondering if there is any attribute that I can tweak to make the quality the same. If you want I can show you an example

Thanks!

@erickao08 Might be better to start a new issue with your command, the input image and the results that you are getting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhangnan0324 picture zhangnan0324  路  8Comments

zygimantaskazlauskas picture zygimantaskazlauskas  路  3Comments

trong8820 picture trong8820  路  8Comments

itty53 picture itty53  路  4Comments

VanillaChai picture VanillaChai  路  9Comments