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 resize and maintain height and width ratio IR image column

mrpkingMay 23 2012 — edited May 24 2012
Hello, I am upgrading from 3.2 to 4.1 reports that include images in report columns. I have had good success with this except for one thing. If the height and width is fixed it distorts the photos, and if I do not have fixed dimensions the image may be too large depending on the original dimensions of the :P1_PHOTO item which is File Browse... BLOB column. I do not want to restrict users ability to upload large image files, or files with different dimensions, but I want them to display as a thumbnail size proportional to the original dimensions in the report, or maybe I need a different approach? Report region template is No Template. I appreciate any suggestions.

select decode(nvl(dbms_lob.getlength(photo),0),0,null,'<img src="'||apex_util.get_blob_file_src('P1_PHOTO',id)||'" height="75" width="75"/>') photo from table.

I tried using percent i.e.: width="10%" that does not work.
I have tried several variations of <style> in page HTML header to change column width, but the image size does not change.

<style>
td[headers="PHOTO"] {
width:75px;
}
</style>

<style>
#apexir_PHOTO{width: 75px;}
</style>

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2012
Added on May 23 2012
8 comments
3,808 views