Home > Archive > Visual Basic > November 2005 > TransparentBlt - 16bpp bitmaps
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
TransparentBlt - 16bpp bitmaps
|
|
| Kasia Muniak 2005-11-28, 6:55 pm |
| Hi,
It's my problem with TransparentBlt function.
From M$ documentation:
----------------------------------------
Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Included in Windows 98 and later.
and
The TransparentBlt function supports all formats of source bitmaps.
[...]
-----------------------------------------
If '... supports all formats ...' I expect that the function
will work *properly* with all formats of bitmaps, in particular
without memory leaking.
If a source bitmap is 4 or 8 bbp then the function
actually works properly.
But if I use a bitmap with color depth = 16 bbp,
this function leavs in the memory copy of transparent bitmap.
Each time TransparentBlt is repeated, it leavs
in the memory one copy.
In the Win98 it is a big problem, because of huge consumption
of system resources.
Can you please explain the reason of this behavior?
Maybe I'm wrong?
Kasia Muniak
| |
| Mike Williams 2005-11-28, 6:56 pm |
| "Kasia Muniak" <kasiamuniak@op_deletespam_.pl.invalid> wrote in message
news:%23T5i1kE9FHA.632@TK2MSFTNGP10.phx.gbl...
> But if I use a bitmap with color depth = 16 bbp, this
> function leavs in the memory copy of transparent bitmap.
> Each time TransparentBlt is repeated, it leavs in the memory
> one copy. In the Win98 it is a big problem, because of huge#
> consumption of system resources.
> Can you please explain the reason of this behavior?
It's a bug. The TransparentBlt API has a memory leak in Win98. See this:
http://msdn.microsoft.com/library/d...itmaps_2y9g.asp
If you want to draw something transparently then create a mask and use
BitBlt to do it (a method which is very much faster than TransparentBlt
anyway).
Mike
| |
| Kasia Muniak 2005-11-28, 6:56 pm |
|
User "Mike Williams" <Mike@WhiskyAndCoke.com> wrote
news:uHtDn#E9FHA.1032@TK2MSFTNGP11.phx.gbl...
> "Kasia Muniak" <kasiamuniak@op_deletespam_.pl.invalid> wrote in
message
> news:%23T5i1kE9FHA.632@TK2MSFTNGP10.phx.gbl...
>
[...]
>
> It's a bug. The TransparentBlt API has a memory leak in Win98. See
this:
>
>
http://msdn.microsoft.com/library/d...ary/en-us/gdi/b
itmaps_2y9g.asp
>
> If you want to draw something transparently then create a mask and
use
> BitBlt to do it (a method which is very much faster than
TransparentBlt
> anyway).
>
Thanks...
Kasia Muniak
|
|
|
|
|