eagles9999 wroteIn my application I have the functionality for customers to choose their own logo and then that gets displayed
at various places and also printed on any reports.
The issue is that some customers have logos that are taller than they are wide while other have logos wider than they are tall.
I have been pondering a way to accommodate either of these orientated logos and keep thinking I need two attributes that are
displayed using READ PROTECT rules and the need to place both on a report so that only one get printed (cannot define a variable size
of and image on a report)
Just wondering if anyone else had tackled this and if so, how did you overcome it?
Mark, I hope my answer addresses your question, if not, it could still serve some points.
I also deal with same case, but it has to do with a person taking picture of themselves and depending on the orientation of the camera when it was taken, the picture could be tall or wide.
However, I can't have those large sized images stored and transferred to client every time they need to see the photo. So, I wrote a routine a while ago [shared it here and Henrik made a new thread in tips to cover it] that it would crop the image properly with respecting aspect ration. In my case, I always wanted to control the height as static value, so the routine would calculate the proper width.
You can use that routine and also change it to have fixed width and variable height. So, you can always check, if the width is greater than height, use the static height routine, and if the height is greater than width, use the static width routine. Then you save back the image to it's original attribute, replacing the larger one (if you want create a second attribute). Doing so, you can always guarantee, you have images/logos that do not exceed (width or height) beyond certain limits and will fit correctly on reports and screen.
Hope this helps!