11-15-2022, 01:22 AM
Sure with Step, I will magnify the image by 5 and keep it centered on screen and preserve the ratio of Width to Height:
Code: (Select All)
Screen _NewImage(800, 600, 32) ' screen width, height, 32 is _RGBA colors
_Delay .2
Logo& = _LoadImage("qb64pe.png")
scale = 5 ' we are going to magnify the image by 5 and preserve the ratio of width to height
scaleW = scale * _Width(Logo&) '
scaleH = scale * _Height(Logo&)
' put image, the actual size, into the middle of our screen
_PutImage ((_Width - scaleW) / 2, (_Height - scaleH) / 2)-Step(scaleW, scaleH), Logo&, 0
b = b + ...