|
-
Jan 29th, 2001, 02:29 PM
#1
Thread Starter
Addicted Member
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...
-
Jan 30th, 2001, 01:32 PM
#2
Fanatic Member
Try storing them in an image list, and extracting them out of there.
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jan 31st, 2001, 03:28 PM
#3
Thread Starter
Addicted Member
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?
-
Feb 3rd, 2001, 03:00 PM
#4
Thread Starter
Addicted Member
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?
-
Feb 4th, 2001, 01:10 PM
#5
Frenzied Member
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.
-
Feb 4th, 2001, 05:18 PM
#6
Thread Starter
Addicted Member
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..."
-
Feb 6th, 2001, 11:57 AM
#7
Frenzied Member
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...
-
Feb 6th, 2001, 04:44 PM
#8
Thread Starter
Addicted Member
I found GIF file format(s) on Wotsit's, so I'll just extract the color out of the file and use TransparentBlt...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|