Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Setting options to images in Magick .NET collection

$
0
0
I'm trying to reduce the file sizes of the GIF animations I'm exporting, I've read up on how to do it. Another thread suggested to reduce the quality, add compression and slightly blur the picture which is what I'm trying to do like so:
using (MagickImageCollection col = new MagickImageCollection(@"C:/PathToGif"))
        {
            for (int i = 0; i < col.Count; i++)
            {
                col[i].Quality = 85;
                //col[i] optional blur etc
                col[i].CompressionMethod = CompressionMethod.LZW;
                col[i].Strip();
            }

            col.Write(@"C:/Path/To/Outputh");
        }
The code runs however the settings seem to be ignored, while setting AnimationDelay the same way does work. I verify it by checking the quality and file size of the output, which seem to be the same as when I don't use any of the settings. Even setting quality to 20, gives the same results.

I've also attempted to use QuantizeSettings where I passed a value of 255 to the colors property. Which just seemed to lock my application up, while using 50% CPU. (I gave it about 5 minutes before forcefully closing the application)

My application processes a .GIF of about 950 kB and turns it into 5.3 mB which is unacceptable.

Could someone tell me if I'm doing something wrong and point me into the right direction of doing this? I was unable to find a different way of applying these settings.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>