473,396 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Windows Metafile and Overlay

hi,
Iam doing some graphics programming with C#. I have to create a
Windows MetaFile from a base64 encoded string. How do i create the
file.

I want to Overlay this Windows MetaFile on a image which is present
in a Picture box. Any ideas to do this?

Thanks
senthil
Nov 16 '05 #1
1 3905
senthil,

You should be able to call the static FromBase64String method on the
Convert class to get an array of bytes representing the Windows MetaFile.
Once you have that, you can pass the array to the constructor of a
MemoryStream instance. Finally, pass that MemoryStream to the constructor
for a Bitmap instance, and you should have a Bitmap that you can use to
overlay on other images, or save to a file, etc, etc.

To produce the overlay, I would get the image in the box, and then just
create a new image, painting the bottom layer, then your metafile over the
image, and then setting the picturebox back to that image.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sendhil" <re*********@yahoo.com> wrote in message
news:97**************************@posting.google.c om...
hi,
Iam doing some graphics programming with C#. I have to create a
Windows MetaFile from a base64 encoded string. How do i create the
file.

I want to Overlay this Windows MetaFile on a image which is present
in a Picture box. Any ideas to do this?

Thanks
senthil

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Julian Ziersch | last post by:
This code causes a severe memory leak - the critical part is the call to GetHenhmetafile(). System.Drawing.Imaging.Metafile lImage = new System.Drawing.Imaging.Metafile("C:\\meta0.emf"); IntPtr...
0
by: Never Best | last post by:
I'm having troubles attaching the Device to a window using its hWnd, and I have some troubles with getting transparancy to work with a DDOverlay... if anyone could help it would be greatlay...
2
by: George Yefchak | last post by:
Hi I need to retrieve a metafile image from the clipboard and render it as a bitmap in my application. In particular, an image will be placed on the clipboard by pasting from PowerPoint (I...
2
by: NickP | last post by:
Hi there, I am obtaining a meta file from the clipboard via the following code Dim CF_ENHMETAFILE As Integer = 14 Dim cMFeImage As Imaging.Metafile Dim pIPrClipboard As IntPtr =...
2
by: Laurent Navarro | last post by:
Hello, I am using a library which returns a byte containing RAW data, ie all pixels' color values coded in a byte array without header. I would like to save those data into a JPEG file so I...
1
by: Robert Ludig | last post by:
How do I set overlay images for ListViewItems in a Windows Forms ListView? I want to overlay an additional Icon on top of the ListViewItem's icon. Since I can do this in MFC/Win32 I suppose this...
2
by: Alexander Gorbylev | last post by:
Hi! Let the size of vector is e.g. 3.5". I render the same vector on a printer & a screen on the same procedure: printDoc_BeginPrint(object sender, PrintEventArgs e) { .... vector.Width *...
5
by: pravinnweb | last post by:
i have dropdown select menu in my page. when i click here link the black overlay comes .in FF overlay working fine but in IE6 the select option menu appeared on overlay...please help me thanks in...
1
by: bern11 | last post by:
I can get bitmaps from the clipboard, but how do I get Metafiles? The specific instance I am testing is copying a piece of Word clip-art into the clipboard and trying to read it in an application. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.