HighTechTalks DotNet Forums  

Metafile with pixel format

Dotnet Framework (Drawing) microsoft.public.dotnet.framework.drawing


Discuss Metafile with pixel format in the Dotnet Framework (Drawing) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
gana
 
Posts: n/a

Default Metafile with pixel format - 10-06-2004 , 01:19 AM






Hello,
I'm creating a metafile and creating a graphics from this metafile. After
this I'm drawing manythings on this graphics object. Finally I'm saving this
as BMP or JPeg format. Problem is the crated metafile is showing PixelFormat
as Format32bppRgb. I want to save this metafile to bmp with pixel format
Format24bppRgb. So output is completely different from what I expect.(Mainly
the dimensions). Can you please help me to change the default pixelformat of
metafile to Format24bppRgb.
Thnaks.
--
Gana

Reply With Quote
  #2  
Old   
Bob Powell [MVP]
 
Posts: n/a

Default Re: Metafile with pixel format - 10-06-2004 , 09:26 AM






Create a bitmap with the desired bit depth, get a graphics for it, draw the
metafile to it, save the 24bpp image to a bmp, jpg or whatever file.

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

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

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml






"gana" <gana (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,
I'm creating a metafile and creating a graphics from this metafile.
After
this I'm drawing manythings on this graphics object. Finally I'm saving
this
as BMP or JPeg format. Problem is the crated metafile is showing
PixelFormat
as Format32bppRgb. I want to save this metafile to bmp with pixel format
Format24bppRgb. So output is completely different from what I
expect.(Mainly
the dimensions). Can you please help me to change the default pixelformat
of
metafile to Format24bppRgb.
Thnaks.
--
Gana



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.