469,903 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Transparent Color in an Icon

How can I find the transparent color in an Icon and convert it into a Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on icons
that have other than the transparent color in the 0,0 pixel position.

--
Dennis in Houston
Nov 21 '05 #1
8 5477
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor
Nov 21 '05 #2
Thanks but he doesn't cover this topic.
--
Dennis in Houston
"Cor Ligthert" wrote:
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor

Nov 21 '05 #3
Dennis,

I see now that your question is not often answered in this newsgroup.

However maybe you can search this newsgroup and first look at this thread,

http://groups-beta.google.com/group/...26cb411e73a2c8
:-)

Cor
Nov 21 '05 #4
:-) lovely site! it isn't?

Cor Ligthert wrote:
Dennis,

Bob Powell is the painting guy, did you see his pages already

http://www.bobpowell.net/

I hope this helps something

Cor

Nov 21 '05 #5
"Dennis" <De****@discussions.microsoft.com> schrieb:
How can I find the transparent color in an Icon and convert it into a
Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I
know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on
icons
that have other than the transparent color in the 0,0 pixel position.


Did you already try 'ToBitmap'? This method will preserve transparency:

\\\
Dim i As Icon = ...
Dim b As Bitmap = i.ToBitmap()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
Haven't tried that yet but will do so. When it's converted to the bitmap, is
there any way to find the transparency color from the bitmap?
--
Dennis in Houston
"Herfried K. Wagner [MVP]" wrote:
"Dennis" <De****@discussions.microsoft.com> schrieb:
How can I find the transparent color in an Icon and convert it into a
Color
type in VB.Net 2003?

I want to convert it into a bitmap with the same color transparent. I
know
that I can convert it to a bitmap then read the color of the pixel at 0,0
then make that color transparent in the bitmap but this doesn't work on
icons
that have other than the transparent color in the 0,0 pixel position.


Did you already try 'ToBitmap'? This method will preserve transparency:

\\\
Dim i As Icon = ...
Dim b As Bitmap = i.ToBitmap()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
Well, bitmaps really can't have transparent colors... I would
personally use PNGs. And even then, Microsoft is notorious for making
it almost impossible to use ARGB in .Net.

Nov 21 '05 #8
So how does bitmap.MakeTransparent(color.red) work. Doesn't the bit map
display routines mask all pixel colors with Red backgroud mask that is Xor'd
or something like that to cancel out displaying all red colors in the bitmap.
I'm looking to find what that color is...there must be someway since the
bitmap certainly can have transparent areas.
--
Dennis in Houston
"ba*******@gmail.com" wrote:
Well, bitmaps really can't have transparent colors... I would
personally use PNGs. And even then, Microsoft is notorious for making
it almost impossible to use ARGB in .Net.

Nov 21 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Martin Reikenkamp | last post: by
reply views Thread by Ziver | last post: by
2 posts views Thread by Peter Steele | last post: by
reply views Thread by Josch | last post: by
1 post views Thread by FredC | last post: by
1 post views Thread by =?Utf-8?B?a2VpdGguaHV0Y2hpc29u?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.