Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 416
  • Last Modified:

Transparent Bitmap

I have a bitmap with a white background. I have tried to use the TransparentBlt function to copy this onto a Window with the current background still displaying. It works except for certain white pixels that remain. I cannot see why this is occuring as the bitmap has only got a few colours.

I also tried using the TransparentBlt function that appeared on Code guru with the same results. What am I doing wrong?
0
philsmicronet
Asked:
philsmicronet
1 Solution
 
badalpatelCommented:
I think u r saving ur bitmap in .gif format.
try the .jpeg or .png format for saving ur bitmap.
or
ur response.contentype is .gif also here u try the jpeg or png format
0
 
philsmicronetAuthor Commented:
The bitmap is a bitmap stored in the visual C solution. I am using LoadImage which comes from a resource.
0
 
prajapati84Commented:
First of all try to identify in which format you are saving bitmap. It's necessary b'coz we had the same problem & tried .jpeg or .png instead of .gif.

Regards,
Mukesh
0
 
philsmicronetAuthor Commented:
The file came from a jpeg. We then save it as a .bmp file and then inserted this in a resource from Visual Studio. I am not sure how else we can do this.
0
 
yotamsherCommented:
Hey  philsmicronet

my guess is that htese pixels are "not exactly" white.
try to open the bitmap, in some editor (visual studio editor, can also do it), and use the fill tool, to fill the white area, in another color, let's say red.
my guess, is that these pixels, will remain "white".
If so, you can now edit them in the editor, to change it's color to real white (255,255,255).

if this is not the cae, please post again.

Yotam
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now