[RESOLVED] Help: Replace Pink with Transparent! BitBlt? TransBlt?
Ive been searching.. and searching .. and searching all over the place for a decent easy removal of a pink colour BG, but no success.
I basically have an image with pink around it.. I need to remove the pink and just draw the image.
Basically its a custom OptionButtim im creating. Since its circular, i need to get rid of the pink corners.
Any ideas on this?
1 Attachment(s)
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
some1uk03,
check wheather the attached project has somthing for you :)
1 Attachment(s)
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
Here is a well explained example of using bitblt to do that.. If you would be better of with full alphashadowing I'd suggest searching for calphadibsection.cls on google.. Its far more powerful, and not much slower actually..
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
Fazi... Great example there with alpha blending/shadows, but not what i was looking for.
triggernum5 however has posted exactly what i was looking for.
BUT with a small problem!!
The program works as is, but when i implemented it to my project, the result is messy. I get all dark black dots.. like some noise.
I just cant figure it out. It works as a separate project but not within mine.
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
How big are the images you are using it with, and have you stepped through the sub to see what line results begin to go downhill..
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
well the image is 13x65. Its a fairly small image.
when i add a msgbox instead of the Call arg. all numbers are returned >=1.
So no 0.
I dont know wat else it could be.
since its working in a clean project, but on mine.
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
I don't know either unless you post your project.. I meant step through to see what step the results are unexpected at, not necessarily in error..
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
I think I kind of got it, but with a different method.
Using the GetPixel & SetPixelV APIs.
Basically scans each pixel on the picturebox and replaces a certain colour with a different one..
It does the job I need, but takes quite time..
Any Other ideas to speed this up...?
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?
I've heard that GetDIBits is a lot faster GetPixel, it seems as if you put the pixels into a byte array. Try searching.
Re: Help: Replace Pink with Transparent! BitBlt? TransBlt?