imagemagick.net

Resize with crop using ImageMagick.NET and C#

大城市里の小女人 提交于 2019-12-04 07:27:59
I have a big image that I want to resize to 230×320 (exactly). I want the system to resize it without losing aspect ratio. i.e. if the image is 460×650, it should first resize to 230×325 and then crop the extra 5 pixels of height. I am doing the following: ImageMagickNET.Geometry geo = new ImageMagickNET.Geometry("230x320>"); img.Resize(geo); But the images are not being resized to the exact size 230×320. I am using ImageMagick.NET in C# 4.0. This is how I solved the issue. private void ProcessImage(int width, int height, String filepath) { // FullPath is the new file's path. ImageMagickNET

Memory consumption in Magick.NET

回眸只為那壹抹淺笑 提交于 2019-12-02 07:58:45
问题 I have the following lines of code in a function. which reads the image from Amazon S3 . Image size which i am reading is of 1.37 MB where as when i ran the profiler it says read function in image magick library takes 5.6 mb which is very high. Can anyone explain this behaviour? I am attaching the snapshot of my profiler as well as code. AmazonS3 client = Amazon.AWSClientFactory.CreateAmazonS3Client( accessKey, secretKey ); GetObjectRequest request = new GetObjectRequest { BucketName =