Bitmap assign does not copy PixelFormat...
Original Reporter info from Mantis: savage
-
Reporter name: Dominique Louis
Original Reporter info from Mantis: savage
- Reporter name: Dominique Louis
Description:
When 1 bitmap which is say 24bit, is assigned to another bitmap which is
say 32bit, the second bitmap seems to preserve its 32bitness, when it
should not, because an assign has taken place.
Additional information:
The following example illustrates the issue...
var
thebitmap : TBitmap;
undoimg : TBitmap;
begin
thebitmap := TBitmap.Create;
thebitmap.PixelFormat := pf24bit; // definitely 24bit
undoimg := TBitmap.Create; // default bit depth
undoimg.Assign(thebitmap);
//undoimg is now not 24bit! it is whatever the default is when a new
Bitmap is constructed.
end;
I can submit this as another bug report, if necessary.
This was tested in Mac OS X 10.5.8, but may exist on other Operating Systems, using Lazarus revision 22631.
Mantis conversion info:
- Mantis ID: 15128
- Version: 0.9.28.3 (SVN)
- Fixed in version: 0.9.31 (SVN)
- Fixed in revision: 33344 (#21ab9f3b)
- Target version: 1.0.0
- LazTarget: 1.0