|
-
Dec 3rd, 1999, 03:35 AM
#1
Thread Starter
Frenzied Member
Is there a way to make an image transparent. Like you can see an image behind it?
Thanks,
Steve
-
Dec 4th, 1999, 01:15 AM
#2
Addicted Member
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
[email protected]
-
Dec 4th, 1999, 03:23 PM
#3
New Member
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
-
Dec 5th, 1999, 10:39 AM
#4
Lively Member
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.
-
Dec 5th, 1999, 10:35 PM
#5
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: [email protected]
ICQ:31422892
Web Sites:The Blue Link My Home Page
-
Dec 6th, 1999, 01:59 AM
#6
Hyperactive Member
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
[email protected]
ICQ# 47799046
-
Dec 6th, 1999, 02:54 AM
#7
Thread Starter
Frenzied Member
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
-
Dec 6th, 1999, 04:26 AM
#8
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|