Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
92 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
Robberbaron (robr) earned 2000 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

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 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