|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transparent Color in an IconHow 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 Dennis,
Bob Powell is the painting guy, did you see his pages already http://www.bobpowell.net/ I hope this helps something Cor Thanks but he doesn't cover this topic.
-- Show quoteHide quoteDennis 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 > > > 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/microsoft.public.dotnet.languages.vb/browse_frm/thread/f4b3cd7f62c5f30a/7126cb411e73a2c8#7126cb411e73a2c8 :-) Cor:-) lovely site! it isn't? Cor Ligthert wrote:Show quoteHide quote >Dennis, > >Bob Powell is the painting guy, did you see his pages already > >http://www.bobpowell.net/ > >I hope this helps something > >Cor > > > > "Dennis" <Den***@discussions.microsoft.com> schrieb: Did you already try 'ToBitmap'? This method will preserve transparency:> 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. \\\ 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/> 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? -- Show quoteHide quoteDennis in Houston "Herfried K. Wagner [MVP]" wrote: > "Dennis" <Den***@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/> > > 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. 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. -- Show quoteHide quoteDennis in Houston "bastaw***@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. > >
(newbie warning) vb.net, stdregprov, deletekey - Invalid cast
Loop thru all subfolders and list all files under each imagelist and bitmaps Two quick Questions questions about VB.NET, and uses in education Is there code to convert a c# module to VB? Need a Strategy to store the Single Quotes in the Database My.Settings.Add Loading two separate instance of the same assembly Error: Cast From String to type Integer not valid |
|||||||||||||||||||||||