Reputation: 83
how to get the width and height from a image and set those as measurements of a ole element inside a function?
The problem is, if I use a image inside a ole element, the image wil be cropped to 5x5cm instead of leaving it as it is 2x5cm.
In a other thread I found this from C#:
System.Drawing.Image img = System.Drawing.Image.FromFile(@"c:\ggs\ggs Access\images\members\1.jpg");
MessageBox.Show("Width: " + img.Width + ", Height: " + img.Height);
But it seems C# doesn't work in crystal syntax.
Upvotes: 0
Views: 58
Reputation: 4001
You can do this using a Crystal Reports UFL (User Function Library).
One of the 3rd-party UFLs listed here provides a Crystal function to return image dimensions. It also provides functions to Resize and Crop images.
Upvotes: 0