<div dir="ltr"><div><br></div>Is there any way to tell a TImage to save it's Bitmap as-shown? I need to do some relatively simple image resizing in order to ensure images display properly in another application. To do this they need to be a fixed size (512x768), but I need to preserve their aspect ratio by adding padding to the top, bottom and sides, as required.<div>
<br></div><div>For example, if my source image is 100x100, I can scale it up to 512x512 easily enough, but I need have the end result image be 512x768 with padding (solid colour, etc.) at the top and bottom to ensure it is centred.</div>
<div><br></div><div>If you take a TImage control, load the 100x100 example image, set:</div><div>Width := 512;</div><div>Height := 768;</div><div>Centered := TRUE;<br></div><div>Proportional := TRUE;</div><div>Stretch := TRUE;<br clear="all">
<div><br></div><div>The image it contains will display in exactly the way I am after. I am just not sure how to tell the TImage to save THAT image.</div><div><br></div><div>Thanks for any help...</div><div><br></div>-- <br>
<div dir="ltr"><b>Nathan T. Wild</b><br><div><br></div></div>
</div></div>