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
40 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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now