Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / June 2004

Tip: Looking for answers? Try searching our database.

Loading Tiff files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dan Kjaergaard - 04 Jun 2004 23:52 GMT
I am using the Image.FromFile method to load tiff files. After loading the
tiff files I convert them to jpeg's. However, if the tiff file has an
"indexed pixel format" the Image.FromFile method throws an exception.

I can't convert the tiff files before loading them because the files are
delivered from a network-scanner.

I've also tried this:

Bitmap bmp = new Bitmap("Myfile.tif")

, but this throws the exception: "invalid parameter used".

Have I overlooked something in this namespace???

Please help me - thanks

/Dan
Oscar Papel - 05 Jun 2004 00:07 GMT
You need to convert the source image to a non-indexed format before saving
to jpeg.

There are a variety of ways to do this.
You could create an RGBA image and draw on it using the src image.

btw,
It is odd for scanners to deliver indexed formats in the first place.

You might be better off fixing the scanner configuration since you are now
effectively double-compressing.  As a side benefit, you might be able to
generate JPG files directly.

Oscar.

> I am using the Image.FromFile method to load tiff files. After loading the
> tiff files I convert them to jpeg's. However, if the tiff file has an
[quoted text clipped - 14 lines]
>
> /Dan
Dan Kjaergaard - 06 Jun 2004 16:02 GMT
Hi Oscar

Is it possible to convert the source images using the .NET framework?

Many network-scanners are configured to deliver this format (Xerox, Toshiba
etc.), so I can't rely on the configuration of these.

You mention creating an RGBA image and drawing on it using the src image.
How can I do that when I can't open the src image in the first place?

thanks

/Dan

> You need to convert the source image to a non-indexed format before saving
> to jpeg.
[quoted text clipped - 29 lines]
> >
> > /Dan
Bill Broker - 25 Jun 2004 21:26 GMT
Try LEADTOOLS, they have a .NET class library, and it handles lots of
variations/flavors of
Tiff images that the .NET Framework can't handle. (www.leadtools.com)

> I am using the Image.FromFile method to load tiff files. After loading the
> tiff files I convert them to jpeg's. However, if the tiff file has an
[quoted text clipped - 14 lines]
>
> /Dan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.