473,327 Members | 1,952 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,327 software developers and data experts.

Image opacity

Hi,

I wonder if it was possible to change the opacity of an image in a picturebox for example :
I try to make a splash screen that shows up images (one after one). But i would like to change the opacity of the images as the program loads itself... like a progressbar..

And is there a way to make the image b&w too?

Do I need a special library?

thx
Nov 16 '05 #1
1 13174
Baramuse,

I would custom paint the splash screen in this case. What you do is
start by blanking out the image, or flooding the background with the color
you want. Once you do that, you can call the DrawImage property on the
Graphics class to draw your images. You want the overload that takes an
ImageAttributes instance. You would construct this instance and set the
ColorMatrix in the image so that it has an alpha value.

Then, as time progresses, you would fade out one image (set the alpha in
increments to 100) and fade in the other (set the alpha in increments to 0).

Check out the document on MSDN titled "Using a Color Matrix to Set Alpha
Values in Images", located at (watch for line wrap):

http://msdn.microsoft.com/library/de..._usecsharp.asp

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

"Baramuse" <Ba******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
Hi,

I wonder if it was possible to change the opacity of an image in a picturebox for example : I try to make a splash screen that shows up images (one after one). But i would like to change the opacity of the images as the program loads
itself... like a progressbar..
And is there a way to make the image b&w too?

Do I need a special library?

thx

Nov 16 '05 #2

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

Similar topics

1
by: Dean Edwards | last post by:
I am attempting to change the opacity of an image. I can modify opacity ok: function flip(pic, opacity){ pic.style.filter = 'alpha(opacity='+opacity+')'; } But I'm not familiar with...
1
by: mhoeneveld | last post by:
I am writing a small script to fade the opacity of an image/object. The script itself works fine only I do have some unwanted behaviour. I do use a tablecell object and the mouseover/mouseout to...
6
by: Bryan | last post by:
Hello all, I have an image that is set up like a table of smaller images. Instead of just creating the smaller images separately and putting them together with a table or CSS, I decided to just...
6
by: jesper_lofgren | last post by:
Hi, I wonder if its possible to show and hide a image with javascipt. I want the image to disapear from bottom and up very smooth, maybe under 3-4sec. Is it possible ? any tips ? Thanks
1
by: Romulo NF | last post by:
Greetings everyone, I´ve developed a script to make a slideshow using a holder and the images you need. Just place the images you need within a holder, pass the holder ID to the script and its...
0
by: punitshrivastava | last post by:
Hi to All, I am Punit Shrivastava.i created one html page for this i cde like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
4
by: tetris | last post by:
I have this little code wich is working quite good, it makes a slide show on the body background, anyone could guide me on how to add a fade effect as a transition between the images?? var...
1
by: gangui | last post by:
I need to use an image with opacity for my project, but when I import this with the method bitmap, the image miss the opacity. Since the image is a circle, I also tried to draw the image with the...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.