Rotate picture 90 degrees

I need to rotate a picture a fixed number of degrees ( 90,180 and 270) just to get it look correct depending on camera data.

I know they are plugins to rotate pictures but I don’t want the overload of a plugin because the rotation must be done as fast as possible. The picture is available and I only need to rotate it.

Any help will be appreciated.

That probably contradicts itself.
The plugin will be written in C and extremely fast.
Native Xojo code won’t be extremely slow, but it won’t be as fast.

I can understand ‘I don’t want to spend any money’, but if you want it to perform quickly, spend a few dollars on a plugin.

If 39Eur saves you a week’s work, then consider the Picture Plugin from Monkeybread:

http://www.monkeybreadsoftware.de/realbasic/plugin-picture.shtml

or fo 40 EUR, the ImageMagik library which might offer you lots more effects

or you could try the ImagePlay effects library:

and if its just a display thing, you might consider using the Object2d classes, create a Pixmapshape, and apply a rotation to that, which will display it rotated but not affect the source image itself.

something like:

Dim px as PixmapShape
px=New PixmapShape(mypicture)
px.rotation = 90/57.2958

…then display it in the paint event of a canvas

g.drawobject(px,300,300)

Thanks Jeff, It’s not a matter of spending, actually I have some plugins for this.

I thought it would be faster to use something like draw than loading a plugin class, but it seems I was wrong; will use the plugin.

Thanks.