Rajasii
asked on
Tiff File Compression
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.Compres sionCCITT4 );
myEncoderParameters.Param[ 0] = myEncoderParameter;
_img.Save(sSavePath, ici, myEncoderParameters);
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
myEncoderParameters.Param[
_img.Save(sSavePath, ici, myEncoderParameters);
ASKER
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.CompressionCC ITT4 type.
provide the solution for the same.
thanks.
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.CompressionCC
provide the solution for the same.
thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
http://www.google.com/search?q=EncoderValue.CompressionCCITT4 gives me
http://www.codeguru.com/forum/archive/index.php/t-259076.html