Convert string to bytes and bytes to string without encoding

0 Comments

I wanted to save information found in a file to a database without having to deal with encodings, well I found my solution at http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp       [TestClass] public class RliResearchTester { [TestMethod] public void

How to convert a bitmap into a 1bpp monochrome TIFF in C#

3 Comments

If you want to convert a bitmap into a TIFF, than then you can use the code: using (System.Drawing.Bitmap sourceBitmap = new System.Drawing.Bitmap(@"C:\Temp\Source.bmp")) { string outputFileName = @"C:\Temp\Destination.tiff"; if (System.IO.File.Exists(outputFileName)) { System.IO.File.Delete(outputFileName); } sourceBitmap.Save(outputFileName, System.Drawing.Imaging.ImageFormat.Tiff);