TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mitchellguzman
NA
7
0
Get an error tring to using EncoderValue.CompressionCCITT3
Feb 28 2005 2:15 PM
The error message is "Invalid parameter used.", but when I change it to .CompressionLZW it works. All the examples that I found were written in VB.NET and they look like my function below. private bool SaveTIFF(ref string outputFile, ref Bitmap bmp, bool bAdd) { try { 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.CompressionCCITT3); ImageCodecInfo info=GetEncoderInfo("image/tiff"); if (!bAdd) { bmp.Save(outputFile,info,ep); } else { bmp.SaveAdd(ep); } bmp.Dispose(); return true; }
Reply
Answers (
0
)
Class declaration help
Almost Got It Except For: