Solved

Transparent Bitmap

Posted on 2006-11-03
5
405 Views
Last Modified: 2008-01-09
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
Comment
Question by:philsmicronet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:badalpatel
ID: 17872256
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
 
LVL 1

Author Comment

by:philsmicronet
ID: 17872296
The bitmap is a bitmap stored in the visual C solution. I am using LoadImage which comes from a resource.
0
 
LVL 5

Expert Comment

by:prajapati84
ID: 17872698
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
 
LVL 1

Author Comment

by:philsmicronet
ID: 17872754
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
 
LVL 7

Accepted Solution

by:
yotamsher earned 250 total points
ID: 17873630
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

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MacOS and programming in React 7 47
Object Oriented Programming, C#, referencing, scoping. 13 86
Eclipse with various Java releases 7 48
collection output issue 9 65
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question