-
Ok, here's my problem:
I'm using a StdPicture object for storing pictures to draw on the screen. The problem is that when I try to draw (or blit, if you like it more :)) transparent GIF picture, it won't draw transparently. I'm using VB5. Perhaps this is solved in VB6, but I would really appreciate if anyone knows how to solve this problem...
-
Try storing them in an image list, and extracting them out of there.
-
I tried what you suggested, but it doesn't work. I even tried using different RasterOp constants, but that didn't do much. Any other suggestions?
-
I know how to use masks, but that solution is absolutely out of consideration. I need this for a program I'm making, so I don't know what pictures will be loaded...
Anyway, TransparentBlt sounds good and it works fine, but how would I know which color is to be transparent?
I know I would have to open GIF file and then find that color, but is there any simple solution to this?
-
If you have an hex editor and a program to save transparent GIFs, you could try saving the same image with different transparent colors. Then, open them with the hex editor and see what byte changes between the files. By checking that byte, you see what palette index was used for the transparency.
-
Thanks Jotaf98, but obviously you haven't read my previous post :)
quote: "I need this for a program I'm making, so I don't know what pictures will be loaded..."
-
Ok... if you want to know if an image is a GIF or not, check if the first 4 bytes are "GIF8" (or something - open a GIF image with Notepad and see what the first bytes are). I think there's no other way...
-
I found GIF file format(s) on Wotsit's, so I'll just extract the color out of the file and use TransparentBlt...