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
58 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# LINQ ForEach() question 6 54
Powershell File Sort 8 41
Why use this lambda? 12 38
C# Linq - Join two objects into one 3 14
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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