MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to scale/resize a picture?
Feedback.

Answer: There are several ways to scale or resize a picture. The easiest way may be the ScaleMBS function in the Picture class.
Example:
dim Original,Scaled as Picture

Original=LogoMBS(500)
Scaled=Original.ScaleMBS(100,100,true)
Notes:
The plugin ways:
- The GWorld class which uses QuickTime. Includes nice Bicubic scaling with QuickTime 6.
- QTGraphicsImporterMBS and QTGraphicsExporterMBS can scale/resize.
- CoreImage scale filter may result in the fastest and best images on Mac OS X 10.4.
- NSImageMBS can scale, but is Mac OS X only.
- CGImageMBS can scale, but is Mac OS X only.
- CIImageMBS can scale, but is Mac OS X only.
- QuickTime Graphics exporter and importer can be connected to scale. (this was used more often a few years ago)
- ImageMagick can scale very nice and crossplatform. But the ImageMagick libraries are big.
- The picture.ScaleMBS function is self written and results in equal output on Mac, Windows and Linux without any additional libraries installed.
- Picture.ScalingMBS does crossplatform scaling with several modes.

with pure REALbasic:
- make a new picture and draw the old one with new size inside.




Links
MBS FileMaker blog