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

New Post: LOSSLES IMAGE COMPRESSION

$
0
0
Hi, I have problem with ImageOptimizer. I'm doing almost the same process here but I get this error:

An unhandled exception of type 'System.TypeInitializationException' occurred in Magick.NET-Q8-x86.dll


Additional information: The type initializer for 'ImageMagick.MagickFormatInfo' threw an exception.

Any help would be appreciated Thanks.!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Drawing;

namespace LosslesImageCompression
{
   static  class Program
    {
        static void Main(string[] args)
        {
            FileInfo birds = new FileInfo("C:\\dev\\workspaces\\visual studio\\Staj 2016\\HSV\\image\\birds.jpg");  

            ImageMagick.ImageOptimizer optimizer = new ImageMagick.ImageOptimizer();
            Console.WriteLine("Bytes before: "+birds.Length);
            optimizer.LosslessCompress(birds);

            birds.Refresh();
            Console.WriteLine("Bytes after: " + birds.Length);
            
         

        }
    }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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