?
Solved

Tiff File Compression

Posted on 2008-10-06
6
Medium Priority
?
1,788 Views
Last Modified: 2013-12-17
The below shown code I used to set the "CompressionCCITT4" for Tiff Image, while generating the code, I am getting the error message called "Invalid Parameter".

Rectify the error provide the alternate solution for the same.

ImageCodecInfo ici = getCodecForstring("TIFF");
Encoder myEncoder = Encoder.Compression;
EncoderParameters myEncoderParameters = new EncoderParameters(1);
EncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, (long)EncoderValue.CompressionCCITT4);
myEncoderParameters.Param[0] = myEncoderParameter;

_img.Save(sSavePath, ici, myEncoderParameters);
0
Comment
Question by:Rajasii
[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
  • 2
  • 2
6 Comments
 

Author Comment

by:Rajasii
ID: 22656911
I have tried the same for past 3 weeks, hope there is some bug with the compression type.

I change the color to black & white of tiff image. It changes only the color not the property.

due to this I was unable to set the EncoderValue.CompressionCCITT4 type.

provide the solution for the same.

thanks.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 22657060
Did you look here too?
http://www.bobpowell.net/onebit.htm

If you did, I have no more ideas
0
 

Accepted Solution

by:
Rajasii earned 0 total points
ID: 22657969
Thanks, for your work on the same. I also tried the same activity, it will change the color of the layer not the color property.

Finally I got the solution, By setting the image quality with JPEG pixel format for the tiff image, the size get reduced.

Issue
ImageCodecInfo ici = getCodecForstring("TIFF");

Solution.
ImageCodecInfo ici = getCodecForstring("JPEG");

by changing the parameter, my issue got solved.




0
 

Expert Comment

by:sindhureddy
ID: 32862012
I tried using this above solution but I couldnot save multipage tiff when I set it to JPEG pixel format. Please let me know if there is any other way to reduce the tiff file size
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

765 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