Image size is lighter from command-line tool than that of Magick.NET code
See original GitHub issue- Magick.NET version: -Windows 10, Magick.NET-Q16-AnyCPU: 7.14.0.0
Question
My .Net code as below gives image with size 644KB and from command-line i get 395KB. Is there something i need to change/add in the code?
All the input values are same in both the cases.
.NET code:
using (MagickImage image = new MagickImage(inPath))
{
using (var newImage = image.Clone())
{
newImage.Resize(size.Width, size.Height);
newImage.Strip();
newImage.Format = MagickFormat.WebP;
newImage.Quality.Equals(quality);
newImage.Settings.SetDefine(MagickFormat.WebP, "lossless", "false");
newImage.Write(outPath + ".webp");
}
}
Command-line code: convert $inputFile -strip -resize $dimension -quality 90 -define webp:lossless=false $outFileName
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
c# - Magick.Net Image FileSize is always Zero
You are getting 0 for the file size because the frames of the image are not aware of the size of the complete...
Read more >Annotated List of Command-line Options
Below is list of command-line options recognized by the ImageMagick command-line tools. If you want a description of a particular option, ...
Read more >GraphicsMagick Image Processing System
GraphicsMagick is a robust collection of tools and libraries to read, write, and manipulate an image in any of the more popular image...
Read more >ImageMagick: Command-line Options
Below is list of command-line options recognized by the ImageMagick command-line tools. If you want a description of a particular option, ...
Read more >How to resizing bulk images at once by using a good tool ...
I want to decrease all of the files' sizes such that they are all ... How to resizing bulk images at once by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And thanks for the quick responses.
Well, it worked. That was stupid of me. Thanks.