Rotate Image from Database

Stimulsoft Reports.NET discussion
Post Reply
ape
Posts: 20
Joined: Thu Jul 03, 2008 2:21 am

Rotate Image from Database

Post by ape »

Hello

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

greetings
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Rotate Image from Database

Post 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.
ape
Posts: 20
Joined: Thu Jul 03, 2008 2:21 am

Rotate Image from Database

Post by ape »

thanks,

that would be a nice feature for the designer

so long
ape
ape
Posts: 20
Joined: Thu Jul 03, 2008 2:21 am

Rotate Image from Database

Post 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);}
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Rotate Image from Database

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Rotate Image from Database

Post by Vital »

Hello,

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

Thank you.
Post Reply