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

Setting transparent colour of image

Hi,

I've got a byte array containing some image data, and I am writing it to
the web browser on the fly as a PNG file. The problem that I am having
is that I want to be able to change one of the colours within the file
to transparent.

I have tried searching Google for the answer, but I'm not sure exactly
what terms to look for, so nothing useful has come up! Can this actually
be done, and if so how would I go about it?

Thanks,

--
Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!
May 10 '06 #1
2 1158

Dylan Parry wrote:
Hi,

I've got a byte array containing some image data, and I am writing it to
the web browser on the fly as a PNG file. The problem that I am having
is that I want to be able to change one of the colours within the file
to transparent.

I have tried searching Google for the answer, but I'm not sure exactly
what terms to look for, so nothing useful has come up! Can this actually
be done, and if so how would I go about it?


Bearing in mind that quite a lot of browsers have trouble with PNG
transparency (see eg
<http://entropymine.com/jason/testbed/pngtrans/>)...

I would like to say I have definitively found an answer for you, but
this seems to be a bit of a minefield. This groogle search seems to
look promising though:

<http://tinyurl.com/kwka8>

--
Larry Lard
Replies to group please

May 10 '06 #2
Pondering the eternal question of "Hobnobs or Rich Tea?", Larry Lard
finally proclaimed:
<http://tinyurl.com/kwka8>


Thanks. That got me on the right path, and I have managed to get
transparency working, although for some images it results in a Generic
GDI+ error, which is most unhelpful :( What I think I will do is leave
this particular hurdle for a while until the more important parts of my
system are finished!

--
Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!
May 10 '06 #3

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

Similar topics

7
by: Thomas Wieser | last post by:
Hi, my problem: I have some tables with transparent backgrounds, which are changed in colours within a JavaScript DOM function to have a roll-over effect. Now, i can't get them back...
1
by: James Dean | last post by:
I want to put my own custom colors in the Pallete.....could someone tell me how to do this?. I tried the following: bitmap.Palette.Entries.SetValue(Color.White,0); This was supposed to set the...
1
by: Tim Geiges | last post by:
I wrote an image viewer and just added the zoom feature, so when the image is larger than the form scrollbars appear, but when I scroll the image(if it has transparency) it leaves a trail of image...
5
by: Tony Clark | last post by:
Hi, I have a bmp that is set in a panel, i want to make the white color in the bmp image transparent so i can see the color of the panel below. How is this done? thanks tony
2
by: wanwan | last post by:
I'm trying to make the background of a picture transparent, so I use paint to fill the background with blue (0,0,255), then set the transparent colour to it. I found a custom control that can do...
3
by: NickP | last post by:
Hi there, I have a usercontrol that inherits from Windows.Forms.Button. In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the...
8
by: Brian Ward | last post by:
I am looking for a simple way to set the image transparency in a PictureBox. I have a moving PictureBox containing a graphic image .. moving by incrementing its Left property. The background...
1
by: deshg | last post by:
Hey everyone how are you all doing? I am trying to use the imagerotate GD function to place an image on top of another image at an angle. Obviously when it rotates an image it creates a...
19
by: david.karr | last post by:
If in my CSS I set the "background-color" property on the "body" element, it only covers the background of the elements defined in the body, up to the current width and height of the page. However,...
0
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.