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

dotnet drawing api : Metafile to BMP (or image type) need to retain quality



Michael Phillips, Jr.
7/25/2007 1:31:05 PM
[quoted text, click to view]

One way is to not convert the metafile at all. Use
Graphics.RotateTransform(180.0F) while printing your metafile.

[quoted text, click to view]

Gina_Marano
7/25/2007 5:02:10 PM
Hey All,

I have a metafile that I want to convert to an image format. The main
purpose behind this is to rotate the image 180 degrees. However, the
quality is quite pixilated. What is the best way to do this?

basically I want to convert the metafile to an image format, rotate
180 then print it.

The metafile is generated from
Microsoft.Reporting.WinForms.LocalReport.Rendor (Visual Studio
reportviewer).

If I print it out directly without converting to image the quality is
there.

Thanks for any help

~Gina_M~
Bob Powell [MVP]
7/26/2007 8:56:45 PM
I would be willing to bet money that you are using the printer DC
settings to determine the resolution of the image. Remember that this is
given in 10ths of an inch NOT in pixels. To obtain the correct image
size for your printable bitmap you should multiply the declared size by
the DPI/10 of that dimension.

Remember also that not all printers have square pixels so you may need
to create an image with a different horizontal resolution to vertical
resolution.

--
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]
Gina_Marano
8/3/2007 4:44:14 PM
On Jul 25, 10:31 am, "Michael Phillips, Jr."
[quoted text, click to view]


Thanks guys for the help! Yes, I was just following MS examples and
was rendering to a metafile instead of a BMP. If I render to a BMP
then I just rotate and all is good. Sometimes I make things too hard.

~Gina_M~
Gina_Marano
8/3/2007 4:45:18 PM
Bob,

Is there a newsgroup for the visual studios report viewer?

~Gina_M~
AddThis Social Bookmark Button