Groups | Blog | Home
all groups > dotnet sdk > november 2005 >

dotnet sdk : wmf Image raw GUID says memory BMP


David Thielen
11/9/2005 11:16:41 AM
Hello;

The subject line say wmf and the text of my first post says emf - sorry I
didn't keep it consistent. I was testing emf first.

But the problem is both emf and wmf return the GUID for MemoryBmp - so how
do I know which one it was?????

--
thanks - dave


[quoted text, click to view]
David Thielen
11/9/2005 11:20:17 AM
Hi;

When I create a Bitmap object with a file, I then look at the RawFormat GUID
to see what bitmap format the file was in. This works great for all of the
bitmap formats (gif, jpg, etc).

But when it is an emf file, it does not have the Wmg.GUID but instead the
MemoryBmp.GUID. Why does it do this and how can I determine if a bitmap is
from an emf instead of a memory bmp?

--
v-phuang NO[at]SPAM online.microsoft.com (
11/10/2005 9:13:57 AM
Hi

Based on my test, I can not reproduce the problem.
Metafile mf = new Metafile(@"C:\Program Files\Microsoft
Office\CLIPART\PUB60COR\AN01173_.WMF");
MessageBox.Show(mf.RawFormat.Guid.ToString()+"\n"+ImageFormat.Wmf.Guid.ToStr
ing());

If you still have any concern, can you send your test emf file to me.
BTW: Metafile will be vector graph, but it could also contain Bitmap, I
think that may cause the problem.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen
11/13/2005 3:15:07 PM
Hello;

The problem is if you do new Bitmap("AN01173_.WMF"); // not new Metafile().

When you create a Bitmap object using a wmf or emf file, the RawFormat GUID
is MemoryBmp.GUID.

--
thanks - dave


[quoted text, click to view]
v-phuang NO[at]SPAM online.microsoft.com (
11/15/2005 12:00:00 AM
Hi

I think if we load emf/wmf into a Bitmap, it is considered as a Bitmap but
not a metafile, that is similar with we show a metafile and do a print
Screen to get a screen shot.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen
11/15/2005 5:34:03 AM
I agree.

But... Since you can do new Bitmap("file.wmf") I think it should have the
correct RawFormat.

--
thanks - dave


[quoted text, click to view]
v-phuang NO[at]SPAM online.microsoft.com (
11/15/2005 6:32:58 AM
Hi

Commonly, I think it is better use Metafile for wmf/emf file, because
Metafile class is used for emf/wmf. But Bitmap class is used when we want
to handle a Bitmap.
That is just like we paint a wmf file onto a bitmap and save it as bitmap,
in this way, the result picture should be a bitmap.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button