Einhugur Picture Effects Scaling speed

@Björn_Eiríksson

Hi Bjorn

I am looking for the fastest way (preferably synchronously) to scale Xojo pictures with good quality for display on the fly. The scaling may not be the slow step, it might be the actual drawing itself, but I’m not sure and any speedup would help.

In general for both mac and Windows how does the speed of using your plugins compare to using Xojo’s GraphicsDrawPicture method using all they optional parameters of that method to scale on Mac and Windows?

Using the plugin would need to include the time it would take to convert a Xojo Picture to your format, scale it, and then reconvert it to a Xojo picture.

Thanks,
-Karen

You always end up having to use the Xojo Draw picture, there is not really any way around that.

Benefit of RawBitmap comes usually from multistep things. And of course not loosing accuracy and other such.

It also depends on what you are doing. Like if you have 30 mb picture much larger than the screen then you should work with it in a model (like the rawbitmap for example) and draw scaled representation.

Note also that you do not really get high quality scaling on Windows with GraphicsDrawPicture . (something I encounters few days ago when I updated the Registrator, the logos are scaled really poorly on Windows), but I did not have time to re-facture it to RawBitmap.

And of course there is also the factor of where the picture originates. Is it from disk or Database (both of which can be read in directly as RawBitmap) or is it something else.

Actually the are PDFs coming from a Database that are converted to xojo pictures page by page using the DynaPDF plugin.

It looks like using pictureEffects to do the scaling would not get me much of anything - except maybe better quality on Windows

-Karen

PictureMBS has scaling method so you could render the DynaPDF page into a PictureMBS object, scale it using PictureMBS and then convert it to a Xojo Picture.

hello
already tried with Pixmap Shape
has great scaling and rotation
Examble:

https://www.dropbox.com/s/ltat436xloztix6/bildanzeige-einfach.xojo_binary_project?dl=1