Page 1 of 1

Rotate Image from Database

Posted: Mon Jul 14, 2008 7:30 am
by ape
Hello

Is it possible to rotate an image 180°?
The image is stored in a database.

greetings

Rotate Image from Database

Posted: Mon Jul 14, 2008 7:48 am
by Edward
Hello.

Yes, it is possible to do.


In the GetImageDataEvent please write the following code:

Code: Select all

Image myImage = StiImageHelper.GetImageFromObject(MyDataSource.MyDataColumn);
myImage.RotateFlip(RotateFlipType.Rotate180FlipNone);
e.Value = myImage;
Thank you.

Rotate Image from Database

Posted: Tue Jul 15, 2008 6:24 am
by ape
thanks,

that would be a nice feature for the designer

so long
ape

Rotate Image from Database

Posted: Tue Jul 15, 2008 8:37 am
by ape
i found a better solution in the designer:

double click on the image field.

->image data

and add following code:

Code: Select all

{ StiImageHelper.GetImageFromObject(MyDataSource.MyDataColumn); e.Value.RotateFlip(RotateFlipType.Rotate180FlipNone);}

Rotate Image from Database

Posted: Tue Jul 15, 2008 10:39 am
by Edward
ape wrote:thanks,

that would be a nice feature for the designer

so long
ape
Ok, we will add this feature then, no problem.

We will inform you in this topic when the feature is available.

Thank you.

Rotate Image from Database

Posted: Mon Feb 16, 2009 10:08 am
by Vital
Hello,

We have added new property ImageRotation to Image component. Please check build from 9 Feb.

Thank you.