Depends on bmp resolution. Black in 24 bit mode is three bytes "000"
go to this thread to get headerfile info
thread222-197569
if color palette is used. Look thru color palette(section of file right after header and before actual picture data)
for "000" the order in which the colors are listed is the index value. example color palette
0 0 0
0 5 5
0 4 4
000 is color 0
055 is color 1
044 is color 2
Then picture data like:
0 0 0 1 1 2 2 2
is color 0 three pixels then color 1 two pixels and color 2 three pixels.
umm well i have only played with vb for the last year part time and i am not that far up to speed
is there a newbie channel for this sort of thing?
what i want to do is get form1.picture (24 bit bmp) and say mage all black pixels transparent
now if there is an easy way (i know its not like going up the shop) please tell me
dont get me wrong i am willing to learn just that all that is just too high up for me.
i now know that a bmp has a header and an info header and a bitmap info structure
Sorry, haven't worked with transparences and don't have the time to find out for you. But, here is what you can do to find out for yourself. Get a winamp skin that has transparences. Rename the extension to zip and unzip it. You will see about 8~10 bitmaps. Look in each bitmap for transparencies and if you find one. use it to find out which color is used for transparencies. The simples way is to open the data section of the file and look at it as an array of integers by writing a simple VB program.
Someone else might post a simpler ready made method. But if your going to do pixel level editing on a bmp, I suggest you play around with the above Idea. After all, sooner or later you'll have to gain hands-on experience anyway.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.