Platforms to show: All Mac Windows Linux Cross-Platform

Back to Picture class.

Picture.ScaleImageAndMaskMBS(width as Integer, height as Integer, AntiAlias as boolean=false, YieldTicks as Integer=0) as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Graphics & Pictures MBS Picture Plugin 7.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scales the picture to the new size including mask (in case one exists).

This is a self made algorithm which produces nice pictures on all platforms.
It is slower than QuickDraw on Mac OS, but nicer than drawpicture on Windows.
Returns nil on low memory or invalid width and height values.

AntiAlias is set to false if width<=self.width or height<=self.height.

If YieldTicks is 0, no time is given to other threads in your application. If it is a value > 0, this time is waited before a thread switch is done. Setting it to 1 will give away control to another thread after 1/60th of a second. We recommend a value of 3 to 5 for a good reponsibility of your application.

Version 19.4 or newer of our plugin includes scaling for pictures with alpha channel.

Some examples using this method:

Blog Entries

The items on this page are in the following plugins: MBS Picture Plugin.


The biggest plugin in space...