473,385 Members | 2,210 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,385 software developers and data experts.

drawing alpha-blended images

Hello...

i want to draw on my form PNG file with alpha-blended transparency.
so i use this code:

Graphics canvas = e.Graphics;

Image Image = Image.FromFile(@".\Dragon.png");

canvas.DrawImage(Image, 0, 0, Image.Size.Width, Image.Size.Height);

the problem is, what alpha-blending do not work, and i can't find any useful
examples...

..net 2.0, C#

thanx)
Apr 21 '06 #1
2 2965
"Using a Color Matrix to Set Alpha Values in Images". article may help
maybe.

"David" <da*******@hotmail.com> wrote in message
news:eT**************@TK2MSFTNGP05.phx.gbl...
Hello...

i want to draw on my form PNG file with alpha-blended transparency.
so i use this code:

Graphics canvas = e.Graphics;

Image Image = Image.FromFile(@".\Dragon.png");

canvas.DrawImage(Image, 0, 0, Image.Size.Width, Image.Size.Height);

the problem is, what alpha-blending do not work, and i can't find any
useful examples...

.net 2.0, C#

thanx)

Apr 21 '06 #2
no... it's somthing else
the alpha "color-matrix" set in image itself
(i read it before)

"Kenan Kilictepe" <ke***@kilictepe.net> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Using a Color Matrix to Set Alpha Values in Images". article may help
maybe.

Apr 21 '06 #3

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

Similar topics

0
by: Andrew James | last post by:
Gentlemen, I'm looking for a graphing or drawing python package that will allow me to draw complex geometric shapes. I need to be able to create shapes like cogwheels and Venn diagrams: ...
3
by: instruo | last post by:
I'm using the System.Drawing.Bitmap class for loading a 32-bit bmp file which includes an alpha channel. The problem is, when it gets loaded (just using the Bitmap(string filename) constructor),...
6
by: Boni | last post by:
Dear all, I have about 500 rectangles on the picturebox, and if I take one with the move and move I MUST clear the whole picture and redraw, which takes about 1-2 second. The rectangles are...
3
by: Peter Oliphant | last post by:
I'm importing a jpeg via: Bitmap* image = new Bitmap( filename ) ; Then, using the Drawing::Graphics object, I execute DrawImage( image, x, y ). My problem is that the original image was...
4
by: Brian Henry | last post by:
I have an icon I want to draw onto the screen, but I want to streatch it out to be about 256x256 and make it about 75% transparent how would I go about this? do i need to convert it to a bitmap...
5
by: Ringo | last post by:
I'm new to C# and want a simple app to display a bitmap that is in bayer format. I searched the group and have an app that can draw pixels in a picturebox using Pset. My problem is that Pset uses...
4
by: Carsten Schmitt | last post by:
Hello, I want to draw a simple pixel (i.e. a red pixel in the center of the screen), which is always in the foreground - even when running a fullscreen application like a DirectX game. I need...
11
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
2
by: Zytan | last post by:
I wanted to do something simple like checking my own Color variable against Color.Black, and == returned false, even though their RGB values were all 0! Of course, there's the A (alpha) value, but...
9
by: raylopez99 | last post by:
After refering to the below thread, I take it for C# Forms 2.0, there a way to draw a 1 pixel by 1 pixel rectangle, which I was able to do just now successfully. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
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
BarryA
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...
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...

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.