Vote UpVote

Quick FMX tip – TBitmap.CopyFromBitmap is not synonymous with TBitmap.Assign

Delphi Haven – Quick FMX tip – if you are calling the CopyFromBitmap method of TBitmap and wondering why it isn’t working (cf. the first issue reported here), it’s probably because you are attempting to write to an empty bitmap. In other words, like the CopyRect method in the VCL, CopyFromBitmap does not resize the destination bitmap, so the latter needs to be big enough beforehand if you want all the source pixels to be copied over. Nonetheless, if you want to resize the destination bitmap as well, just call Assign rather than CopyFromBitmap: DestImage.Bitmap.Assign(SourceBitmap);
Favorite? Off-Topic? Chris Rolliston @ 2012-11-08 20:34


Visits: 536
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)