How to resize and maintain height and width ratio IR image column

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.
td[headers="PHOTO"] {
#apexir_PHOTO{width: 75px;}

Try to go with max-width / max-height. However, if you have IE browser, hang on for pain. For some ideas, some links: (ignore object-fit, it is not yet supported on most browser)
etc. Be sure to try out your chosen solution on the target browser(s)!
IE is just nasty :(
What i have done before is not to have my browser scale my images, especially when the images can be large(r) and you expect quite some traffic. All those extra (kilo)bytes won't help it load faster. I just added an extra column in the table, like photo_thumb, and create a scaled version of the uploaded picture when it is being inserted.
For example, i have the following process on my apex page, and i'm using wwv_flow_files.
Have some code:
     v_id number;
     v_small_photo blob;
     v_large_photo blob;
     v_mime_type apxt_contacts_img.mime_type%type;
     v_content_type apxt_contacts_img.content_type%type;
      SELECT blob_content a, blob_content b, mime_type, content_type
      INTO v_small_photo, v_large_photo, v_mime_type, v_content_type
      FROM wwv_flow_files
      WHERE name = :P3_FIND_PHOTO;
      IF lower(v_mime_type) NOT IN ('image/jpg', 'image/jpeg') THEN
         raise_application_error(-20001, 'File for upload is not a jpg!');
      END IF;
      -- Rezise the photo so that it is proportionally 125*125
      -- ordimage is an oracle type able to manipulate all sorts of pictures
      ordimage.process(v_small_photo, 'maxScale=125 125');
      -- If contact is of type personnel, then no need to store
      -- a large photo since it wont be displayed
        v_large_photo := NULL;
      END IF;
      -- Delete previously uploaded picture
         DELETE FROM apxt_contacts_img
          WHERE contact_id = :P3_ID;
      END IF;
      -- Insert the data into the contacts_img table as a
      INSERT INTO apxt_contacts_img
      -- Remove the image from the apex wwv_flows_files table
      DELETE FROM wwv_flow_files WHERE name = :P3_FIND_PHOTO;

Similar Messages

  • How to resize the calendar height and width

    how to re size the calendar height and width...
    Ie i need to fix this calendar region  7 cross 4 format in my page

    If the text exceeds the container, which can happen in a scrollable container where you have to scroll to see some of the text, then the values getContentBounds returns are estimated values. This is because we don't want to force the text to recompose all the way to the end of a very long TextFlow in order to return a value. However, if you want to get the exact amount, and don't mind taking the time to recompose, call textFlow.flowComposer.composeToPosition(), before calling getContentBounds. This forces all the text to recompose to the end, and then getContentBounds will return the fully calculated value instead of estimating.

  • How do I view the height and width of an image as I adjust the crop handles

    How do I view the height and width in pixels of an image as I adjust the crop handles before I actually crop the image?

    If you are in Photoshop CC, go into Preferences, click Interface, and turn on Show Transformation Values. In the picture below, setting it to Top Right means the pixel height and width appear to the Top Right of the Crop tool pointer.
    (Edit: The picture only shows Height because the bottom edge is being dragged. If a corner was being dragged it would say H and V.)

  • Resizing a cluster (height and width) programatically

    Thank you to anyone who can answer this question. Is it possible to resize a cluster on the front panel programatically? If this is possible, how may I do so? I wish to affect the cluster's height and width (or equivalent)? As far as I can tell, the height and width are read only.
    Thank you again.

    Though you cannot change a Cluster's shell size directly, you can change the size of any item in the shell, which will then change the Cluster's shell size.
    So, create a property node to one of your Cluster's controls or indicators and set it to write the 'Size' properties. You can then make this your programic method to resize your cluster's shell. If you don't want to affect any of your cluster's items, then create a 'dummy' transparent control and change it.
    See attached LV 6 example.
    Good luck with it, Doug
    Attachments: ‏17 KB

  • How to fix accrodion panels height and width?

    I have a question regarding my accordion panel. I made 3 template files with the same accordion panel. Somehow when I reviewed it in my Outlook, the accordion panel was a different size on each html file. Where do I fix the accordion panel's height and width?
    Thank you!

    Welcome to Apple Discussions
    Look at this thread:

  • How to resize the menu,address and bookmark toolbars. Not the font but the toolbar sizes

    I'm trying to reduce the overall space of the top of the firefox page.
    I have the menu and the the bookmarks tool bars checked and between those 2 and the address and site header it takes up way to much real estate.
    My font size is good but the wasted area is way to much and I can't seem to find the simple answer to looking for addons and themes to just resize the height of the space.
    This is the new 33.1 and up to this point all custom has been a breeze.
    Thanks much.

    Have you considered running Firefox in [[How to make Firefox and websites go full screen|Full Screen mode]]? There is also an extension that hides the toolbars until you hover your mouse over the top of the screen:
    You can change the size of your toolbars by using the userChrome.css file, or by installing [ Stylish] and using one of these styles:
    * You can edit the code of the style to suit your needs better. I don't know how it will affect the current interface, so if you find that Firefox becomes unusable after using this style, load Firefox in [[Troubleshoot Firefox issues using Safe Mode|Safe Mode]] and uninstall Stylish to remove it
    ** Alternatively, if the address bar still works, type in '''about:addons''' in your address bar, and go to the User Styles tab, then disable/remove the style
    For more information on userChrome.css:

  • Can an i-frame resize the page height and itself with new content?

    I built a website in Adobe Muse and embedded a blog within an i-frame on the portfolio page of the site here...
    This approach was taken because the client needed the ability to keep  adding videos to the portfolio section of the site themselves  indefinitely and
    i was short on ideas to implement that functionality  with Muse. I've now exported the code as HTML to Dreamweaver to see what I can achieve there.
    Using Dreamweaver, Is it possible for the page height and i-frame height to resize with new  content as more videos are added to it? Is there some script I can  add to the page?
    Is there a better solution?

    Ordinarily, Iframe re-size scripts will only work when the parent page (with iframe) and the external page (blog) both reside on the same domain.   However, someone came up with a cross domain solution which requires you to put jQuery scripts on both sites.  NOTE:  I've never tested this.
    IMO, a cleaner solution is to use scripts to parse the blog's RSS feed into the main site.  You can use PHP code from FeedForAll or jQuery's jFeed plugin.
    The main advantage in using a script to parse feeds is you control the appearance -- to match your main site & how many posts are displayed on the page.
    Nancy O.

  • Copy and paste audio clip and maintain effects and tweaks?

    I created a track on the iPad and transferred successfully to the desktop.
    I then used Melodyne to clean up the vocal track.  Some of the vocal timing was off so i used flex time editing to straighten it out. It's a piece I'd like to loop throughout.
    When I copy and paste the pasted clip loses all the effects and edits and is back to the raw vocal track.
    Is there a way to copy and paste and maintain all of those tweaks?

    Thanks Colin
    I did a complicated mix on one long background music track and was not looking forward to doing that remix because of various minor music changes made by the musician scattered throughout that long track.
    Your Alt (for replace solution) worked perfectly and saved me a ton of time.
    The fact that Copy attributes for Audio doesn't work for copying audio keyframes is another reason do do audio mixes using the Mixer instead of using keyframes to adjust volume.
    P.S.   And a big LIKE to Adobe's clever programmers for including features like these.

  • How to get the exact Height and width of the text in TextLayout Framework

    Hello fellow developers,
    I start working with TLF when there is three different SWC's Now I am working with Single SWC with flex 4 and lot of things are changed like
    I use calculateHeight(),calculateWidth()  now these methods are not available.
    Please if anyone know the replacement of these methods then Let me know.

    If the text exceeds the container, which can happen in a scrollable container where you have to scroll to see some of the text, then the values getContentBounds returns are estimated values. This is because we don't want to force the text to recompose all the way to the end of a very long TextFlow in order to return a value. However, if you want to get the exact amount, and don't mind taking the time to recompose, call textFlow.flowComposer.composeToPosition(), before calling getContentBounds. This forces all the text to recompose to the end, and then getContentBounds will return the fully calculated value instead of estimating.

  • How to resize Tabs, Menu bar and Bookmarks Bar 36.0, no "userChrome.css" file help?

    So I lost my profile when FF updated, and had to create a new one. From what I can tell, to do what I want to do I need a Chrome Folder inside the new profile folder. There was none, so I created one. I also created a .css file named exactly how I put it in the title, is this the correct name, or should "user" be my profile name?
    Last but not least, here is the exact text I have in the file, nothing more, or less, just this:
    <pre><nowiki>@namespace url(""); /* only needed once */
    #TabsToolbar { height: 15px !important; }
    #PersonalToolbar {height: 4px !important;}
    #BookmarksToolbar {height: 4px !important;}
    #MenuToolbar {height: 4px !important;}
    #tabbrowser-tabs { height: 15px !important; }
    #TabsToolbar { margin-top:-15px!important; }</nowiki></pre>
    Saved the file. Restarted FF, no effect. Changed numbers, still no effect.
    TIA for help.
    p.s there is likely some redundacy there for sure, please advise. I want all 3 in title of thread smaller (as in less height)

    I use this code to resize the Tab bar.
    I'm on Linux, so you may have to adjust or omit the margin-top and margin-bottom properties.
    <pre><nowiki>#TabsToolbar { height:25px!important; margin-top:-1px!important; margin-bottom:1px!important; }
    #tabbrowser-tabs { height:25px!important; min-height:25px!important; }
    .tab-background-end[selected=true]::before {

  • How to: Resize a rows height in a table using acrobat 9 pro?

    I'm working on a government grant, with many tables that need to be resized in order to fit the required information. Can anyone help me?

    PDF isn't a word processor like file format -- so, a "rebuild edit" to a table is a "You Don't".
    As to form fields, Acrobat provides one with the ability to edit Acrobat form fields (if the form / file is not protected).
    But, changing a grant form is likely to result in its being rejected by the originating organization.
    Basically, you want to speak with the organization that you will submit the form to.
    It may well be that you are trying to put 2 tons in the 1 ton pickup (less might be ok & actually expected).
    Or, it may be that, unknown to the organization, the PDF form is hosed.
    If so, communicating with the organization may well be a good thing.
    Be well...

  • Dynamically changing the height and width of Stage

              I would like to know how can I change the height and width of stage dynamically. I tried it with the following code:
                             Stage.height = 250;
                             Stage.width = 250;
    during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging. Anybody have any idea about this.

    Hi Ross,
                I could understand something about the problem after making a research on this topic. We can't change the width and height of stage from actionscript itself, right? I will explain the way I am planning to do. I don't know whether its right or not. Anyway you just go through it. First the player need to be resized, according to the specified height and width. Then in the object tag, there are two fields named height and width. We should change these value according to the specified height and width of video controller, dynamically. Am I right? But I am confused with two properties of Stage such as: align and scaleMode. The code was actually developed my trainer. There, the scaleMode is set to "noScale" and no align property is used. My doubt is how should I set align and scaleMode properties of Stage. Hope you understood what I meant.

  • Get width and height of a dynamically loaded image once it's done loading?!

    hello : :
    well... i'm taking my first shots at flex after programming
    in flash for a year now. it's been fun and i've been picking up on
    things pretty well (or so i think), but i come across something
    today that i used to be able to do in my as2 programming and don't
    know how to do in as3...
    in flex, i'm loading an image into an image control (by using
    "myImgControl.load(urlString)"). i have a "complete" parameter on
    the image control that calls a function just fine after the image
    is loaded, but if i try and check the hight and width of the loaded
    image once it loads, it comes back as zero. how can i get the
    height and width of the image after it's loaded?!
    in flash/as2 i used to do this little trick/work-around i
    found in a forum (, i think) to find out the width and
    height once the loaded image listener checked the loading process
    and came back "complete"... in the code below, "imgLoader" is the
    movieClip the image was loaded using
    imgLoaderListener.loadClip(urlString, imgLoader).
    iTot = imgLoader.getBytesTotal();
    iLoad = imgLoader.getBytesLoaded();
    if (iLoad == iTot && iTot > 4) {
    imgH = imgLoader._height;
    imgW = imgLoader._width;
    that all make sense?!
    basically, it's as simple as this: i need to find something
    similar to the above for as3 that will tell me the width and height
    of a dynamically loaded image after it's done loading...
    so there ya have it. i appreciate any help any of you can
    throw my way! thank you so much for even reading this!
    : : michael

    I assume you have probably already figured this out, but just
    in case, there should be an event to listen for after which you can
    get the height and width information successfully. I can't remember
    the exact name, however. Experiment and see which one works

  • Height and width of image loaded into blob?

    i am loading images into my database which is all working fine. in parts of my app i am displaying these images so i am wondering is there a way to get the dimensions (height an width) of the image you are loading in so that when it comes time to display you can scale as needed but the aspect ratio is the same so then the image is not distorted by just putting some random values for height and width.
    instead of
    select decode(file_type,'I','<imge src="OWNER.download_file?p_file=' || nvl(file_id,0) ||'" height="100" width="100" />','') from project_file
    where file_id = :P31_FILE_ID
    i want to replace 100 with values from columns in table that were loaded at time of save
    Message was edited by:

    thanks scott. is it correct to say that this example is storing the image at whatever size the user puts in the width and height boxes on screen? thats what it looks like to me anyway. i see there are functions to get these but does the user have to enter them still? it will be just what i need if indeed I do need it!
    Yes, that's correct. Of course you could modify the code so that you choose the size of the image, and not allow the user to change it.
    - Scott -

  • How do I open png files and maintain transparency?

    How do I open png files and maintain transparency?  I have many image files I had hoped to manage with aperture along with my photos.  I find that it wants to display them with a black bacground( they were designed for white) and when I want to edit that is kept even when I open with a psd format.  What do I do?

    and when I want to edit that is kept even when I open with a psd format.  What do I do?
    Transparency and layers are not supported in Aperture. You can import png-files or psd files with a transparent background and export the originals unchanged, but as soon as you edit them, the transparent background will be lost.
    Aperture is an application to manage photos and not graphics compositions, sorry.
    -- Léonie

Maybe you are looking for