Groups | Blog | Home
all groups > dotnet drawing api > october 2007 >

dotnet drawing api : Draw an image from a file


Samuel
10/28/2007 12:36:59 PM
I would like to print a large tiff image, the size of the tiff file is about
40k but when I create a bitmap so I can print it the size of the bitmap is
40mb or possibly much more

Is there any way to print an image directly from the file (currently I use
PrintDocument)

Thank you,
Samuel

Samuel
10/28/2007 4:50:31 PM
Thank you

Samuel

[quoted text, click to view]

Bob Powell [MVP]
10/28/2007 5:20:02 PM
Unfortunately, files need to be rasterised, this is to say decompressed,
before they can be output to the Graphics object associated with the
PrintDocument.

You could conceivably write the data line by line to the printer
decompressing as you go but the framework does not support this operation so
you'd have to write considerable code to accomplish this outside of the
API's.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


[quoted text, click to view]
AddThis Social Bookmark Button