Results 1 to 8 of 8

Thread: GIF problems

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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...

  2. #2
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Question

    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?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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?

  5. #5
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    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.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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..."

  7. #7
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    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...

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    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
  •  



Click Here to Expand Forum to Full Width