Create a TImage with fixed size without loading an image lazarus / 21-General ---------------------------------------------------------------------- JonBondy · 2025-04-12 11:21 Is there a way to declare a TImage to be 100 x 100 pixels without loading it from a file?  I get confused about the sizes of the Image, Canvas, Picture, etc, and some of those cannot be set at all. Thank you Jon ---------------------------------------------------------------------- TRon · 2025-04-12 14:45 Quote from: JonBondy on April 12, 2025, 01:21:20 pmIs there a way to declare a TImage to be 100 x 100 pixels without loading it from a file? Dimensions of an TImage component depend on: - Underlying bitmap - scaling turned on/off - resizing turned on/off - size of the image component itself - borders on/off - whatever else influences the dimensions of a component Normally: create a (empty) bitmap for the image component using the desired dimensions. At least that is what I suspect you meant to ask with the question. ---------------------------------------------------------------------- JonBondy · 2025-04-12 15:44 @TRon: Thanks! Yes.  I want to create a TImage with an empty bitmap of a specific size so that I can fill it in programmatically. ---------------------------------------------------------------------- TRon · 2025-04-12 15:56 In that case have a look here in the wiki. Note that it might be easier to create an in-memory bitmap (TBitmap) and use the onpaint of the image component to copy the bitmap to the canvas of the Image (or assign the bitmap). ---------------------------------------------------------------------- JonBondy · 2025-04-12 23:17 @TRon: Perfect!  Thank you!