Image aspect ratio

tremara1

Active Member
Licensed User
Longtime User
I don't know if anyone has done this, is there a way to get the aspect ratio of an image and adjust one of the image control attributes (height or width) to match the the original image ratio. I want to be able to use images of varying sizes stored in a db and display them when required. The images would need to be displayed in correct ratio to show accurately. Just wondering.......

tremara1
Ballarat Victoria Australia
 

Cableguy

Expert
Licensed User
Longtime User
I am almost sure one of the image libs as properties that return the image original size...
then its a case of doing the raths to find the ratio and use it in customizing the image control...

Edit:
Found it...
ImageLibEx.dll->BitmapEx Object has Heigth and width props...
 
Last edited:

tremara1

Active Member
Licensed User
Longtime User
Done it again

Thanks I thought it might be one of the libraries, I guess I was a bit lazy..but I knew one of you guys would have it.

thanks again

tremara1

Ballarat Victoria Australia
 
Top