Bug #489
closedTransparency parameter not taken into account in _CPbitmap24 (LIB2DOS24)
Description
Bug: see Subject
Workaround: use _SCPbitmap
Updated by arkeon about 10 years ago
Ho no this is not a bug.
_CPbitmap24 copy an objBitmap not an alphaBitmap
An alphaBitmap is composed of an objBitmap and an objBitmap8 for alpha channel.
so to copy an alphaBitmap you must get the separated components and copy the ObjBitmap and then the ObjBitmap8 to finally recreate an alphaBitmap.
or what you mean by "Transparency" is something else ?
Updated by tony about 10 years ago
arkeon wrote:
Ho no this is not a bug.
_CPbitmap24 copy an objBitmap not an alphaBitmapAn alphaBitmap is composed of an objBitmap and an objBitmap8 for alpha channel.
so to copy an alphaBitmap you must get the separated components and copy the ObjBitmap and then the ObjBitmap8 to finally recreate an alphaBitmap.or what you mean by "Transparency" is something else ?
The transparency is the color transparency parameter which tells what should be copied or not from the source bitmap. So nothing to do with alphabitmaps, just with basic bitmaps (ObjBitmap)
Updated by tony about 10 years ago
tony wrote:
arkeon wrote:
Ho no this is not a bug.
_CPbitmap24 copy an objBitmap not an alphaBitmapAn alphaBitmap is composed of an objBitmap and an objBitmap8 for alpha channel.
so to copy an alphaBitmap you must get the separated components and copy the ObjBitmap and then the ObjBitmap8 to finally recreate an alphaBitmap.or what you mean by "Transparency" is something else ?
The transparency is the color transparency parameter which tells what should be copied or not from the source bitmap. So nothing to do with alphabitmaps, just with basic bitmaps (ObjBitmap)
I assigned this bug to myself. I'll have a look at it as soon as possible.
Updated by arkeon about 10 years ago
srcColor = _COLOR_BGR_TO_I ((char)BS->bits[scx], (char)BS->bits[scx+1], (char)BS->bits[scx+2]);
if ((couleur == NIL) || (srcColor != couleur))
{
BD->bits [ dcx ] = BS->bits [ scx ] ;
BD->bits [ dcx+1 ] = BS->bits [ scx+1 ] ;
BD->bits [ dcx+2 ] = BS->bits [ scx+2 ] ;
}
a small debug with _COLOR_BGR_TO_I comparison value should be easy.
Updated by tony about 10 years ago
arkeon wrote:
srcColor = _COLOR_BGR_TO_I ((char)BS->bits[scx], (char)BS->bits[scx+1], (char)BS->bits[scx+2]);
if ((couleur == NIL) || (srcColor != couleur)) {
BD->bits [ dcx ] = BS->bits [ scx ] ;
BD->bits [ dcx+1 ] = BS->bits [ scx+1 ] ;
BD->bits [ dcx+2 ] = BS->bits [ scx+2 ] ;
}a small debug with _COLOR_BGR_TO_I comparison value should be easy.
Which file and which function ? please...
I had a very quick look (no real debugging) at the LIBOS2D dll and found functions that properly (or so it seemed) used the "couleur" (color) variable. But there must be some corruption somewhere.
Updated by tony about 10 years ago
- Status changed from New to Feedback
Correction committed.
Transparency color was not taken into account if source and destination bitmaps had the same dimensions.
Updated by tony about 10 years ago
- Status changed from Feedback to Closed
- % Done changed from 0 to 100
- Estimated time set to 4.00 h