Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to find orientation of image displayed in a report region

341268Sep 4 2008 — edited Sep 5 2008
Hello,

I have Apex 3.1 application showing an image in a report.
The images are held as files on the web server and filename and description held in a database table

I can use SQL to retrieve the data into report columns and then HTML expression to display the image as a fixed size as shown below. This works fine for landscape pictures but obviously distorts portrait ones.
I wanted to check the orientation of the image and adjust width and height if portrait. I was considering using javascript to get image.height and image.width but am not sure how to reference the column and feed back into the HTML expression.

Is this this the best approach and any help how to reference the column would be appreciated

Many thanks
Colin

The Report Region Source is -
select	 "PHOTOFILE"."FNAME" as "FNAME" ,
"PHOTOFILE"."ID" as "ID",
"PHOTOFILE"."DESCRIPTION" as "DESCRIPTION",
"PHOTOFILE"."FNAME" as "IMG2"
 from	 "PHOTOFILE" "PHOTOFILE"
where id=:P4_IMAGE_ID
Column Attributes IMG2
Column Formatting
HTML Expression
<B><I><U><font face="verdana size="16"><center> #DESCRIPTION# </I></U>
<font face="verdana size="20">&P4_DESCRIPTION. 
 </B></center></font>
<br/>
<img src="#IMG2#" width=600 height=400  >
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2008
Added on Sep 4 2008
4 comments
892 views