|
-
Feb 13th, 2003, 04:37 AM
#1
Thread Starter
Hyperactive Member
Transparent bitmap background - how?
I have an application which, to date, has been running on its own PC.
Some of my customers now want to run it along side other applications on the same PC.
I therefore no longer have the luxury of being able to set/restore desktop and regional settings on startup/shutdown.
Everything is sorted apart from the background colours of my bitmaps. I want these to blend in with the colour of the picture box or image control on which they are displayed.
Icons are not a problem. I use Microangelo and it has this invisible ink (?) that you can use for the background colour of an icon.
Is it possible to do the same for bitmaps?
I realise that I could manipulate the bitmap at run time but this seems a bit cumbersome.
I would really like do do something like the Microangelo approach if possible.
As always, any help is appreciated.
Simon Caiger
Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing.
-
Feb 13th, 2003, 04:59 AM
#2
You can't do it with bitmaps, try using Gif/Jpeg files instead. Otherwise you'll need to do something at run time.
-
Feb 13th, 2003, 05:02 AM
#3
Thread Starter
Hyperactive Member
Thanks for the reply,
I was afraid that was what I was going to hear
Looks like I've got a lot of image converting to do.
Simon Caiger
Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing.
-
Feb 13th, 2003, 10:33 AM
#4
As the geek said, you can't do it with bmp files, but if you have them in pictureboxes and are going to blt them to the bacground then it will work....
-
Feb 13th, 2003, 10:43 AM
#5
Thread Starter
Hyperactive Member
Thanks for the reply NoteMe
The images are fixed so rather than suffer the code and time overhead of bitblt at run time, I might as well convert them to a format that does support transparent background and save them in my resource file in that format.
Simon Caiger
Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing.
-
Feb 13th, 2003, 10:46 AM
#6
Good luck..
-
Feb 13th, 2003, 12:36 PM
#7
JPEG doesn't support transparency btw.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 14th, 2003, 06:52 AM
#8
Thread Starter
Hyperactive Member
Thanks CornedBee,
Lucky for me I've started converting everything to GIF and didn't decide on JPEG.
Simon Caiger
Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing.
-
Feb 14th, 2003, 06:32 PM
#9
Good Ol' Platypus
Oh if VB only supported PNG... =)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 14th, 2003, 06:34 PM
#10
You could always try to make your own funtion for it...
-
Feb 14th, 2003, 06:49 PM
#11
He already did
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 14th, 2003, 06:51 PM
#12
So what is he complaining of... ....just kidding...I know what he ment...
-
Feb 15th, 2003, 04:38 PM
#13
Frenzied Member
You can mask bmp's if the backgrounds are opaque colors (white, black etc)..
Done it once, long ago :P
-
Feb 15th, 2003, 04:40 PM
#14
But then you are thinking of BitBlt arn't you....
-
Feb 15th, 2003, 04:47 PM
#15
Frenzied Member
Has been over 2 years since I last used bmp's ..
if I recall correctly yeh, prolly blt's..
-
Feb 15th, 2003, 04:49 PM
#16
so that is what he just said that he didn't want to use...
-
Feb 15th, 2003, 04:53 PM
#17
Frenzied Member
Go for VB.NET then, it supports PNG
-
Feb 15th, 2003, 04:54 PM
#18
Yes, but that would not fix his problem either. Did you read any of the posts at all???
-
Feb 15th, 2003, 04:59 PM
#19
Frenzied Member
yes I did 
and the only thing that does solve his problem is either using Gif's (which restrain him to 256 colors which looks ugly on a 32bit desktop) or use blt's on Bmp's to make it look transparent..
(or blt's on jpg's... which does make the size a bit less)
-
Feb 15th, 2003, 05:00 PM
#20
But he don't want to use BitBlt, so the only way to go is GIF, and that is what he is doing...
-
Feb 15th, 2003, 05:05 PM
#21
Frenzied Member
So all this talking was for nothing except get a higher count in posts?
-
Feb 15th, 2003, 05:06 PM
#22
I don't care about post count. I can't understand why people are trying to get high post counts. The post counts has nothing to say about how good you are anyway....
-
Feb 15th, 2003, 05:08 PM
#23
Frenzied Member
True, it just says how 'talkative' someone is.. 
actually I came by this link that gives an idea how to use PNG files in VB...
http://www.atalasoft.com/forum/topic.asp?TOPIC_ID=578
might be useful.
-
Feb 15th, 2003, 05:10 PM
#24
Ohhh...admitt it...you really didn't read all the posts did you...
NoteMe:
You could always try to make your own funtion for it...
CornedBee:
-
Feb 15th, 2003, 05:12 PM
#25
Frenzied Member
That URL isn't about creating an own function.
admit it, you didn't read the stuff on that url forum did ya?.
Its an object. It just does all the stuff for ya.. thus you dont have to write your own functions to put png support in VB.
But besides that, we are rather spamming this thread with nosense... :P
-
Feb 16th, 2003, 04:45 AM
#26
Yeah, he did try, but he gave it up.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 16th, 2003, 04:48 AM
#27
This ImageLib seems to be capable of loading PNGs. But is it free?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 16th, 2003, 06:26 AM
#28
Frenzied Member
You can download it here:
http://217.158.136.10/~ultimate/cgi-...ail.cgi?ID=285 (legal link, not illegal warez stuff)
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
|