|
-
Sep 11th, 2001, 07:11 AM
#1
Thread Starter
Hyperactive Member
What's the best method for transparent images.
I have photoshop, but I can't get anything on a VB form that's transparent. (Despite all the settings.) I looked into bit blitting, but it sucks in regards to having to individually make the image masks for it. If it were mostly done from code I would like it, and I'm not sure if it supports gifs.
So what is the best way to get transparent images?
-
Sep 11th, 2001, 02:49 PM
#2
New Member
bitblt is by far better then using seperate created images.. with bitblt u can make all the images into 1 image file... load it to a picturebox(or created DC) and bitblt the picture u want. if you use
images and put them in to picture boxes and move them around.. youll get flickering..
-
Sep 12th, 2001, 09:28 AM
#3
Thread Starter
Hyperactive Member
What do you recommend me doing for Direct X? Know any good tutorials?
-
Sep 12th, 2001, 06:42 PM
#4
-
Jan 7th, 2002, 07:00 AM
#5
Lively Member
I think what you need is opacity and not transparency. Opactiy is the level of transparency. technically speaking you can achieve opacity in visual basic through alpha blending. search for alpha blending in planetsourcecode.com. good luck !!!
-
Jan 8th, 2002, 07:35 AM
#6
Fanatic Member
(ignore this post if you are in fact making a game, not a normal application)
Originally posted by JSG
directx (my personal prefrence) if you don't mind puting a bit more time into it....and once you have done it once or twice it becomes second nature
"what? it won't run? well duh, you'll need DirectX offcourse, even Solitaire required DirectX"
imagine that 
(ok, a bit overexagorated maybe , but read on and you'll understand)
What do you need the transparancy for? Mostly, you can simply fake it by putting the background in the image itself. You could also create a mask at runtime, then use BitBlt, this will eliminate the overhead of DirectX.
Basically, don't jump directly to DirectX, first determine what the goal is, how it can be done best. Startup time vs. runtime speeds, it's a choice you have to make. DirectX requires a lot more time and memory resources, however, it runs quite fast after that. BitBlt is easier, doesn't need initialization, but won't do any good for high-speed animations.
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Apr 23rd, 2003, 09:34 PM
#7
Frenzied Member
Originally posted by tppradeep18
I think what you need is opacity and not transparency. Opactiy is the level of transparency. technically speaking you can achieve opacity in visual basic through alpha blending. search for alpha blending in planetsourcecode.com. good luck !!!
Alpha Blending is only doing opacity in relation to something else. To prove this, try doing this on a form with a picturebox overlapping the contorls and try to alphablend that.
-
Apr 24th, 2003, 02:29 AM
#8
Fanatic Member
I think you should've looked at the last post date before posting that reply
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Apr 24th, 2003, 06:39 AM
#9
Good Ol' Platypus
Ack, GRAVEDIGGERS
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Apr 24th, 2003, 09:19 PM
#10
Addicted Member
Jared, I reccommend a user-defined type I made called AnimSurf2D. It is already a solid performer speed-wise because of direct access to graphics arrays. I made a few custom blit subs that are not that difficult to understand. they do their own clipping (otherwise, because it's direct array access you can get array bounds error), masking and alpha-blending and simple colorize effects. The subs work with the type, and you can also bitblt the type because one member of the type holds the 'memory dc' of device-independent bitmaps (bitmaps stored in memory) created with windows api. so with the type you get all these pieces of information: width, height, totalpixels, direct access to the actual bitmap array by 2 different ways .. as Long (for speed) or as byte for quality image processing. plus i have a 'high resolution' array (heavy on memory but provides lossless spectrum shift operations if you know how to do that sort of thing) (i wrote a sub that for that) and a createsurfacefromfile sub that writes 255 into the alpha channel of the surface for every pixel that is not black, for simple mask operation of one of my custom blit subs.
The biggest advantage though is how easy it all is to use. Let me know and I will post an example
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
|