Re: Error Saving EMF Metafile from Clipboard
- From: "Michael Phillips, Jr." <mphillips53@xxxxxxxxxxxxxxx>
- Date: Mon, 19 May 2008 18:54:45 -0400
Here is an example in code:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2082527&SiteID=1
In your case, after you create a memory mapped file handle for your image
size(i.e., height * stride), you use the handle with CreateDIBSection to
create an empty bitmap to draw your metafile on.
After you convert the metafile to the DIB, you use the same memory mapped
handle to create the WIC BitmapSource.
Using the WIC BitmapSource you encode the image as a TIFF.
The following is an outline of the steps:
1) Create the empty DIB as outlined above.
2) Create a memory DC backed by the video driver.
3) Select the empty DIB into the memory DC
4) PlayEnhMetafile into the DC.
5) Select the DIB out fo the DC.
6) Create the BitmapSource using the handle to the memory mapped file.
7) Encode the BitmapSource to a TIFF.
.
- References:
- Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Re: Error Saving EMF Metafile from Clipboard
- From: Michael Phillips, Jr.
- Re: Error Saving EMF Metafile from Clipboard
- From: levi
- Error Saving EMF Metafile from Clipboard
- Prev by Date: Re: Error Saving EMF Metafile from Clipboard
- Next by Date: The story: Painting bitmap to screen is slow
- Previous by thread: Re: Error Saving EMF Metafile from Clipboard
- Next by thread: Fill Problem When Displaying a Large Metafile
- Index(es):