Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Convert Image To COMPLETE Black&White

I have a gif image which is way too big for my needs (even if it is 100~300kb)

In photoshop, I managed to turn my 160kb gif to 15kb (1/10 of his size!!) simply by reducing the number of colors he is using to 2 (Black&White).

I wanted to do the same thing in my application but all I could find was turning image into grayscale which turned my 160kb gif to 100kb.

Is there anyway to turn my gif to COMPLETE black and white? Any other way that can shrink the gif to an even smaller size will be appreciated.

like image 607
Or Betzalel Avatar asked Dec 20 '25 22:12

Or Betzalel


1 Answers

Here is a codeproject example of how to turn it into a bitonal G4 compressed TIFF. Note that this is excellent for images with a lot of whitespace and text, but not so good for images. With images, you may want to see the other answer and use dithering.

like image 52
emfurry Avatar answered Dec 22 '25 11:12

emfurry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!