473,386 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Error when tring to save bmp to TIFF using CompressionCCITT3

Some of the code is below, when I change the EncoderValue.CompressionCCITT3
to EncoderValue.CompressionLZW it works fine. The error message is the
generic error "Invalid parameter used.", I suspect one of the
EncoderParameters is either wrong of missing. Thanks.

Bitmap bmp = new Bitmap(814, 1148);
Graphics g = Graphics.FromImage(bmp);

g.FillRectangle(Brushes.White, 0, 0, 814, 1148);
System.Drawing.Imaging.Encoder eng =
System.Drawing.Imaging.Encoder.SaveFlag;
System.Drawing.Imaging.Encoder eng1 =
System.Drawing.Imaging.Encoder.Compression;
EncoderParameters ep = new EncoderParameters(2);
ep.Param[0] = new
EncoderParameter(eng,(long)EncoderValue.MultiFrame );
ep.Param[1] = new
EncoderParameter(eng1,(long)EncoderValue.Compressi onCCITT3);
ImageCodecInfo info =
GetEncoderInfo("image/tiff");

bmp.Save(outputFile,info,ep);
Nov 16 '05 #1
0 1482

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Bonds | last post by:
I have designed a multi-threaded application that manipulates images (CCITT Group 4 TIFF Images). I'm getting some strange behavior and I'm wondering if anyone else is seeing the same thing. I run...
8
by: Skwerl | last post by:
Hi guys. I've written code to embed an ICC profile in a TIFF image, and I think my IO operations are slowing things down. It is taking about a second to embed each tag in 7-meg TIFF files. ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
5
by: Ladvánszky Károly | last post by:
I'm trying to use a statically linked C library. I've wrapped a .NET C++ DLL around this lib and trying to drive the wrapper from a .NET VB testbed. The whole build succeeds but I get the following...
7
by: Philip Wagenaar | last post by:
I use a class to manage tiff's (written by someone else) to splitt multipage tiffs. However, when I run it, it fails, for other people it seems work ok. The method in the class is :public...
3
by: T. Davis | last post by:
In C#, I am able to successfully stream a TIFF image that comes from a BLOB field in a database, save it to file, then convert the pages within TIFF file into jpegs (using GDI+) and display on the...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
0
by: Stedak | last post by:
We are scanning images and saving them as TIFF's in a database. We are running into some problems because in the creation of the TIFF the EncoderValue.CompressionLZW is ignored. It does not seem to...
1
by: sainathparuchuri | last post by:
As a project requirement we need to convert word documents to tiff images. We have been using Microsoft Office Document Image Writer (MODI) for this puspose and doing absolutely well. But now this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.