Resize images...

BlitzPlus Forums/BlitzPlus Programming/Resize images...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well, I'm no expert, but heres my idea.
You catch the window resize event using a Select WaitEvent or Select PeekEvent. The event id is $802.

Keep a Const value of the Base Window Width (BWW) and the Base Window Height (BWH). Then use ScaleImage for every image, with the X param as BWW/New Window Width, Y param as BWH / New Window Height.

Two extra suggestions: Have duplicates of the images, the base image that you load, and an image that you display. Whenever you scale the images, make the display image a scale of the base, so the image doesn't get too distorted.
Second: You may need to work out a formula for the images postition, as this may need to change as the window is resized.

I hope I've helped.