Hi,
i try to create a bitmap with transparent regions, but it does not work.
the transparent region turns out to be black.
anybody some ideas??
Dim bmap As Bitmap(100,100,Imaging.PixelFormat.Format32bppPArg b)
Dim g As Graphics = Graphics.FromImage(bmap)
g.Clear(Color.Transparent)
g.DrawRectangle(New Pen(Color.Blue, 10), New Rectangle(10, 10, 80,80))
g.dispose
'do something with the bitmap.... 2 2039
Hi,
Dim bm As New Bitmap(100, 100)
Dim g As Graphics = Graphics.FromImage(bm)
g.FillRectangle(Brushes.Blue, 0, 0, 100, 100)
g.FillRectangle(Brushes.Green, 10, 10, 10, 10)
g.FillEllipse(Brushes.Green, 50, 50, 20, 20)
bm.MakeTransparent(Color.Green)
g.Dispose()
Ken
-----------------------------
"Willie jan" <un*****@unkown.com> wrote in message
news:41***********************@news.euronet.nl...
Hi,
i try to create a bitmap with transparent regions, but it does not work.
the transparent region turns out to be black.
anybody some ideas??
Dim bmap As Bitmap(100,100,Imaging.PixelFormat.Format32bppPArg b)
Dim g As Graphics = Graphics.FromImage(bmap)
g.Clear(Color.Transparent)
g.DrawRectangle(New Pen(Color.Blue, 10), New Rectangle(10, 10, 80,80))
g.dispose
'do something with the bitmap....
thanks.
"Ken Tucker [MVP]" <vb***@bellsouth.net> schreef in bericht
news:uP**************@TK2MSFTNGP14.phx.gbl... Hi,
Dim bm As New Bitmap(100, 100) Dim g As Graphics = Graphics.FromImage(bm)
g.FillRectangle(Brushes.Blue, 0, 0, 100, 100)
g.FillRectangle(Brushes.Green, 10, 10, 10, 10)
g.FillEllipse(Brushes.Green, 50, 50, 20, 20)
bm.MakeTransparent(Color.Green)
g.Dispose() Ken
-----------------------------
"Willie jan" <un*****@unkown.com> wrote in message news:41***********************@news.euronet.nl... Hi,
i try to create a bitmap with transparent regions, but it does not work. the transparent region turns out to be black. anybody some ideas??
Dim bmap As Bitmap(100,100,Imaging.PixelFormat.Format32bppPArg b) Dim g As Graphics = Graphics.FromImage(bmap) g.Clear(Color.Transparent) g.DrawRectangle(New Pen(Color.Blue, 10), New Rectangle(10, 10, 80,80)) g.dispose
'do something with the bitmap.... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: André Borchert |
last post by:
Hello,
how do you select a region (area = x1,y1,x2,y2) of a bitmap and cut or copy
this selection into a new bitmap ?
The original could be a Bitmap object or a Image/PictureBox object....
|
by: James Dean |
last post by:
Question 1:I have my full image and i only display that when the zoom
rate is 1:1......i guess i will set my default display to 1:16.....is it
okay to just return a thumbnail of the entire image...
|
by: Anonieko Ramos |
last post by:
> I have a graphics images that I want to convert to
> ASCII art. How do I do it?
>
Code:
- Default.aspx.cs
|
by: Hrvoje Voda |
last post by:
What is wrong with this code ?
I get message "Attachment.bmp".
Bitmap bm = Bitmap.FromFile(@"..\..\Attachment.bmp") as Bitmap;
//use the color from 0,0 as tranparent
|
by: Balu Ramachandran |
last post by:
How can I create the Thumbnail view from the form?
In the following approach I tried but Iams facing some limitations to get
the thumbnail image of the form alone.
Plaese any one can help in...
|
by: news |
last post by:
Hi Guys,
Sorry if this is an obvious question but Im trying to rotate a bitmap and
then save it. So far Ive only found how to rotates a Graphic but I can't
find how to save it. I also want to...
|
by: Richard Skopal |
last post by:
In .NET Windows forms I can create a metafile using this code:
Graphics grph = aControl.CreateGraphics();
IntPtr ipHDC = grph.GetHdc();
Metafile mf = new Metafile(aImgFilePath, ipHDC,...
|
by: Peter Proost |
last post by:
Hi group I have the following piece of code that should resize the bitmap in
a picture box but it doesn't work as I tought it would. Can someone help me
with it?
thnx Peter
Public Class...
|
by: VBTricks.de.vu Webmaster |
last post by:
Hello,
I have an bitmap in a resources file containing all icons displayed in
the toolbar. To display the icons I need to cut them out of the bitmap
and add them to an imagelist. The problem is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
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...
| |