.Tif Files in C#

Again for my lovely OCR Project, I need to be able to use .tif files. TIF Files use an Index Pixel Format. Does C# Natively support these? And if not, would my best approach be to manually make it, or find a library?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can load a TIFF image with this code:

System.Drawing.Bitmap bmp = new System.Drawing.Bitmap (@"C:\picture.tif");

Then you can manipulate the bitmap using the Bitmap class members.
derekthorntonAuthor Commented:
but can it be properly saved back as a tif?
You can use Bitmap.Save (actually inherited from the Image class) to save it to a specified file or stream. Have a look at the different versions of the Save method - you can specify an ImageFormat, ImageCodecInfo and/or EncoderParameters.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

ImageFormat.Tiff is what you will need, so something like:

bmp.Save (@"c:\newfile.tif", ImageFormat.Tiff);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
derekthorntonAuthor Commented:
How do you know all this? Is there a list of all these class members and/or fields somewhere? The MSDN Library is useless, it has no organization whatsoever.
Just the opposite, I use very often the MSDN library and it helps me a lot. I only figured out that the Bitmap class supports TIFF format by loading one (with the line I showed you). Then I went to the MSDN, wrote in the index Bitmap class, then selected all members and just checked the Save method. It has several overloads and I just had a look at the easiest one to work for you.

MSDN online is somewhat more difficult to work on, so I normally prefer the local version. However the online version has absolutely everything as well and is more actual so I also check it from time to time.
derekthorntonAuthor Commented:
Thanks again. I guess I should install the MSDN Local Copy then, I figured it was no different than the online version.
It's a little bit better organized and it has an index - very useful I think. Also it's much faster, you don't need internet connection... But in a bad case the online will also help you once you get used to using it
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.