Solved

Is there a way to save a TIF image file as follows in CompressionCCITT4 using C# with .Net Framework 4.0?

Posted on 2016-09-09
1
52 Views
Last Modified: 2016-09-14
I am developing a C# application using VS2010 and .Net Framework 4.0.

Is there a way to save a TIF image file as follows in CompressionCCITT4 ?

For ex:

img3.Save(tif3, System.Drawing.Imaging.ImageFormat.Tiff);
img3.Dispose();
0
Comment
Question by:zimmer9
1 Comment
 
LVL 32

Accepted Solution

by:
Robberbaron (robr) earned 500 total points
ID: 41792523
appears so... your pseduo code is close...
a google search brings up
fOrgTiff.Save(ms, fImageCodecInfo, fEncoderParameters);

Open in new window

where one of the encoder parameters is EncoderValue.CompressionCCITT4

see
http://stackoverflow.com/questions/4336644/c-sharp-converting-tiff-jpeg-compression-to-tiff-compressionccitt4-gives-a-lot-o

but a better explanation is
http://programcsharp.com/blog/post/save-as-g4-ccitt-tiff-with-.net
First, you need a monochrome (1bpp) source GDI+ Bitmap. .NET doesn't have a very good built in mechanism for converting from color to monochrome. The only reliable and performant method is a scale-to-grey algorithm written in unsafe code.
 not the 2007 date so maybe something better.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question