0

I notice that in Firemonkey there is no equivalent of StretchDraw for changing the size of a bitmap that I have in memory.

I need to increase the size of a bitmap in memory before displaying it in a TImage Control. I want the size of the bitmap in memory to match that of a TImage Control before displaying it. The image bitmap is then sent off to a database blob field. When I recall the bitmap from the database, it is the original size and not the stretched size that I need. Tried using Wrapmode and that works great for displaying and stretching the bitmaps in a TImage but It doesn't save the bitmap as stretched.

Any ideas how to do this in C++ Builder?

  • Perhaps [this answer](https://stackoverflow.com/a/68694739/2292722) to a similar question helps. I'm thinking that you replace the `TImageControl` with a `TRectangle` as in the answer of the other post. – Tom Brunberg Jan 03 '23 at 09:57
  • 1
    I managed to figure it out. You have to setup 2 TRectF variables representing the two different sized bitmaps. Then just call DrawBitmap. Then assign it to the TImage->Bitmap variable – Drewski7280 Jan 03 '23 at 20:42
  • You do know that you can answer your own questions, don't you. – Tom Brunberg Jan 04 '23 at 08:16

0 Answers0