Results 1 to 8 of 8

Thread: REALLY Transparent?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    Is there a way to make an image transparent. Like you can see an image behind it?
    Thanks,
    Steve

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Location
    Dallas,TX
    Posts
    170

    Post

    Steve, I belive the only way to achive that effect is with OpenGL or another graphics programming library. There are several OpenGL Visual Basic Programming sites out there to go into this.

    I could be wrong!



    ------------------
    HTH,
    Philip
    phgarman@home.com

  3. #3
    New Member
    Join Date
    Sep 1999
    Location
    Boise, ID USA
    Posts
    15

    Post

    No, No, children, do not use OpenGL. I never have but I'm sure its complicated. What you need to do is use the BitBlt API call. Read up on it (ie obtaining the Microsoft SDK by searching for BitBlt at www.microsoft.com/vbasic/ (actually, that is not the URL, but it was the old VB page and should take you to the new)). You can make the white parts of the image transparent by ANDing it over the other image or you can make the black parts of the image transparent by ORing it onto the other image.

    -Adam

  4. #4
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    Actually, by Creating a "Mask" image. Then using "SmashingPumpkinsAddict" idea, you can actually get perfect Transparent colours, yes colours plural.

    Eg. Create a Bitmap half white and half black the same size and shape as your actual bitmap, then XOr this to the background, then XOr your actual bitmap.

    This will make parts of your Bitmap "Tansparent"

    Hope this helps,
    Steve.

  5. #5
    Guest

    Post

    I may be being naive here, but is all that messing really necessary?!

    Why don't you just use a GIF image? VB removes any transparent areas for you all by itself...ain't that nice?

    They look a bit sloppy when they load, mind...

    ------------------
    Matthew Ralston
    E-Mail: m.ralston@mediavault.co.uk
    ICQ:31422892
    Web Sites:The Blue Link My Home Page

  6. #6
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    Actually, matthewralston, you're close, but a little clarification is in order. You need to have a picture in what they call "GIF89" format. This is what makes the image transparent around the edges, or basically wherever you haven't already put color. A great program for this is Adobe's Photoshop. Not only is it a VERY powerful tool, but all you have to do to make a transparent gif is export the file in the GIF89 format. It's that simple, that's how they do it on a web page. And VB recognizes the transparent gif coding, so it displays it just the same. I believe you can download a free demo of Photoshop from Adobe's site. And that's all you will need to do it.

    ------------------
    Ryan
    corneslen@hotmail.com
    ICQ# 47799046

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    Actually I am buying photoshop tomorrow. But will that make the actual image part transparent? So I could see through a rocket ship, to see what is behind it, while still seeing it?


    Steve

  8. #8
    New Member
    Join Date
    Sep 1999
    Location
    Boise, ID USA
    Posts
    15

    Post

    Yes, you can use GIF89 if you want to do a transparent image...that is, if you have VB5 or better. Which not all of us have (i.e. ME). Anyway, you're much better off using Bitblt, because its faster, and the VB image control is pretty slow updating, especially on slower computers. And if you ever want to port your app to WinG or another faster graphics system, it will be much easier if its already in the semi-standard Bitblt format.

    -Adam

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