-
December 13th, 2003, 09:16 AM
#1
(1)Overlay a text on DIB. (2)Merge 2 DIBs
Hi,
I am working on a project in which I am getting the DIBs and text data from TCP/IP sockets. I have to overlay this text on the DIBs.
But restriction is that I can not use the CDC:: DrawText() and CDC:: TextOut() methods. Reason is that my original data is coming from a TCP/IP socket as DIBs. If I use a DC object to overlay the text then I might loose the original colors of the DIB if current display settings has lesser colors then the origibal DIBs. I need a method which overlay the text on DIBs itself, without loosing any color/display info. Is there any API available to overlay text on DIBs without loosing any color info?????????????????????????
I have an approach: I will create a transparent Bitmap, overlay the text using CDC:: DrawText() / TextOut() at given positions on that transparent Bitmap and then use GetDIBBits() to get the DIB of transparent bitmap. This DIB has text overlayed on it. Now I will merge my original DIB with this transparent DIB. It will have text overlayed on original DIB. This way, my text will be overlayed on the original DIBs and I will also not loose any information of the original DIBs. Is there any way to merge two DIBs??????????????????????????
Pls help me out. I can not loose the colors of my image.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pls reply me directly at: 'swal' at 'momentum-tech' dot 'com'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Saurabh Agarwal,
New Delhi, India
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
|