Displaying images at a fraction of the size

This may not be a coldfusion question but I'm going to ask it
here anyway because cfml developers are the smartest. :)
I have a table that stores images paths and in my cfm file I
pull the path and display the image. What I want to do is take that
image and display it at a fraction of the size without harcoding
the height and width parts of the img tag. Can I do this? Is there
a way to detect the width and height of an image before displaying
it?
Thanks

Here is one way:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_39.html#5 171309
Ken Ford
Adobe Community Expert - Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com
"idesdema" <[email protected]> wrote in
message news:g5gn1h$sr3$[email protected]..
> This may not be a coldfusion question but I'm going to
ask it here anyway
> because cfml developers are the smartest. :)
>
> I have a table that stores images paths and in my cfm
file I pull the path and
> display the image. What I want to do is take that image
and display it at a
> fraction of the size without harcoding the height and
width parts of the img
> tag. Can I do this? Is there a way to detect the width
and height of an image
> before displaying it?
>
> Thanks
>

Similar Messages

  • The size of the vault is only a fraction of the size of the library

    There are about 3,000 photographs in the library. All masters are relocated to an external hard drive. The size of the masters is about 34GB, which should be correct. However, the size of the vault is only about 5GB. This does not make any sense.
    Do you have any idea what might be wrong?

    Hmmm... that doesn't sound right. If you have lots of large previews I could see the main library being about double the size of the vault (assuming your master files are JPEGs... in which case previews don't really make sense), but it may be worth checking inside each package file to see what's missing.
    The vault will be smaller because it doesn't include previews or thumbnails... but not that much smaller.

  • How do I take an image in Illustrator and change the size ?

    I have a image I need to down size for my website how do I make it smaller ?

    Gordon,
    You may (you can do that to a raster image or to vector artwork):
    1) Fit the image to the Artboard or fit the Artboard to the image, or set Crop Area/Marks in earlier versions;
    2) Ctrl+Alt+Shift+S/Cmd+Option+Shift+S or File>Save for Web, setting the desired smaller pixel x pixel size in the Image Size window, then click Save.
    You may tick Art Optimized (or Type Optimized for live Type optimization) in the Image Size window, and you may tick Transparency in the main Save for Web window, if relevant. PNG24 is the best format for vector artwork, and may also be used for raster images.

  • Issue with Image upload in DAM (changes the size)

    Hi,
    We are seeing issues with some of the .jpeg files dimensions getting chnaged when uploaded into CQ5.4. For e.g. I have an W-Training-Shoes-hotspot-1b-140x140.2.jpeg of140x140 dimension. When I upload it in CQ it saves with width=1600 & height=140. Did anybody saw this issue before?
    If I copy the original file & resave it with 140x140 size & reload in CQ, it will load fine with width=140 & height=140.

    It looks like the assets has wrong metadata. As a workaround add a process step right after "Metadata extraction" to the update asset workflow and have a script updates with correct dimensions.

  • Displaying images in pdf reports

    a question please..
    can one display only .gif type images or can they also be .jpgs?
    also, is there a limit to the size of the image one displays?
    also, can one control the size of these images in the reports.
    sorry about the above. I have looked around for answers with very little success.
    thanks in advance.

    Hi
    I'm actually wondering about the same thing, however, I'd like to implement a BLOB-image in a PDF Report.
    I found this link http://blogs.oracle.com/xmlpublisher/2006/05/05#a34 which makes it seem that BI Publisher supports base64encoded pictures. (There's a sample there aswell)
    Now my question is; how can we get the blobdata presented as base64 in the XML from ApEx? Anyone with some experience on this?
    Regards,
    Vidar

  • Display images like in images search engines

    I have a list of images that I want to display like the results in yahoo image and google image search engines.But when i use tha datatable component I can just display one column.And after I want to do something after that the user clicks on an image for example displaying it with real size not in thumbnail mode.
    I also tryed using the image browse widget and the yahoo carousel but I dont know how to hand events and how to know which picture is selected.
    Can you please help me.
    Thanks in advance

    fiedlerm wrote:
    I try to display workspace Image in a HTML Region dynamically.
    The Image Source is stored in a hidden Item filled by an application process.
    Region - Source:Always post code using <tt>\...\</tt> tags.
    <img src="#WORKSPACE_IMAGES#Sunny.gif">
    <br></br>
    &P1_ICON_SRC.
    <br></br>The first "hardcoded" Image was displayed.
    The second "dynamic" Image shows the following Text in the HTML - Region:
    <img src="wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&p_fname=Blizzard.gif"> Hidden page items cannot contain HTML mark-up. Look at the page source. When the item is rendered its value is contained in the hidden <tt>input</tt> element's <tt>value</tt> attribute:
    <input type="hidden" name="p_t01" id="P1_ICON_SRC" value="&lt;img src=&quot;wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&amp;p_fname=Blizzard.gif&quot;&gt;">The value must be properly HTML-escaped like this otherwise the browser would see it as tag soup:
    <input type="hidden" name="p_t01" id="P1_ICON_SRC" value="<img src="wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&p_fname=Blizzard.gif">">What exactly are you trying to achieve?
    Options for displaying images dynamically would include putting the required mark-up in an HTML region, only storing the image URI (or parts of it) in the page item, and referencing this using static text substitution. Others would be custom report templates or Dynamic PL/SQL regions.
    If you must store HTML code in session state and access it using static text substitution (not recommended) then use an application item.
    h4. Page Process
    begin
      :P1_ICON_SRC := 'Blizzard.gif'; -- Hidden page item
      :F41327_ICON_SRC2 := '<img src="#WORKSPACE_IMAGES#Blizzard.gif">'; -- Application item;
    end;h4. HTML region source
    <img src="#WORKSPACE_IMAGES#Sunny.gif">
    <br></br>
    <img src="&WORKSPACE_IMAGES.&P1_ICON_SRC.">
    <br></br>
    &F41327_ICON_SRC2.

  • Getting backround image to fit in all browser sizes

         I have an image of a baseball field that I would like to use as the backround of a website I am building.  The problem I am having is that the image doesn't adjust to the size of the browser if I shrink or inlarge the browser.  Is there a way to get backround images to autofit the browser with dreamweaver?

    No.  Background images are static.  They are the size that they are.  You can't make a huge background fill viewport in all displays so don't even attempt to use this as your body background image.
    The best backgrounds are small, seamless tiles or slices that you can repeat vertically and/or horizontally to fill the available viewport.
    More on Backgrounds:
    http://alt-web.com/Backgrounds.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Display Image in Report

    Hi,
    I want to display image link in one of the columns in report.
    ex: if i click that image it should go to google maps.
    I stored the image in /res/s_protal/image.jpg and also in oc4j.
    I know to fmap to show it only once.
    but i want to reflect it in all the rows of a column.
    Things i tried:
    Stored in the same machine took the ip addres and prot and given as below it was working.
    But if i move it to other machines then it getting failed so again i want to update the machine ip.
    http://225.225.225.225:9704/analytics/res/s_proact/images/images.jpg
    Is there any possible way to give some common syntax so that the corresponding machine ip will be pointed once the
    report moved to different machines.
    Thanks,
    satheesh

    Hi Santeesh,
    I just saw your post and I thought I'd ask you with my query:
    I want to add some pop-up info on some of the data when the user hover on it. have you
    got a clue what do I need to do for that?
    Cheers,
    Yonatan

  • How to display image and data in module pool screen?

    Hi,
    I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
    Actually I am able to display image or data any one but not both.
    one more thing I want to display multiple images and their data.
    Please suggest some one if you have any idea.
    Regards,
    Dileep.

    You can try below way, I have used in report.
    DATA: gc_docking              TYPE REF TO cl_gui_docking_container, "#EC NEEDED  "Docking Container
           gc_split                 TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED  "Splitter
           gc_top_container         TYPE REF TO cl_gui_container, "#EC NEEDED  "Top Container
           gc_bottom_container      TYPE REF TO cl_gui_container, "#EC NEEDED  "Bottom Container
          gc_document              TYPE REF TO cl_dd_document, "#EC NEEDED  "Document
           gc_events                TYPE REF TO lcl_event_class, "#EC NEEDED  " Local Event Class
           gc_grid                  TYPE REF TO cl_gui_alv_grid, "#EC NEEDED  " ALV Class
    " Creating Docking
    CREATE OBJECT gc_docking
           EXPORTING
             ratio = c_95.
         IF sy-subrc EQ 0.
    * Splitting the Docking container
           CREATE OBJECT gc_split
             EXPORTING
               parent        = gc_docking
               sash_position = c_10 "Position of Splitter Bar (in Percent)
               with_border   = c_1. "With Border = 1 Without Border = 0
         ENDIF.
    *   Placing the containers in the splitter
         gc_top_container = gc_split->top_left_container .
         gc_bottom_container = gc_split->bottom_right_container .
    *   Creating Grid
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_bottom_container.
       ELSE.
    * Background job handling
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_docking.
       ENDIF.
    *   Creating the document
       CREATE OBJECT gc_document
         EXPORTING
           style = 'ALV_GRID'.
    Regards,
    Sameer

  • Mail 7.3 (1878.6) not displaying images in random messages.

    In the last couple of weeks, I've noticed that, with no preference changes made by me, that random messages are not displaying images only empty boxes with the small blue question-mark box in the middle. This is almost exclusively from companies and organizations that I'm interested in.
    I've made no changes with regard to messages downloading with my mail in Mail's preferences. If I had, I'd think that ALL such messages would behave the same.

    Nothing happens. Loading remote content is a Mail preference for me for everything. Best I can do is choose to click the "if your having trouble seeing this..." offered by many advertisers to take you to their site.
    Since it's random, I wonder if it's not something that has to do with those specific servers sending those messages. And it's only a few, but enough to be annoying. These are people I've received perfect content from for years in some cases. No changes have been made to my preferences.

  • Dynamically controling the size (in pixels) of array elements?

    Hey Everyone,
    I am writing a large vi where front panel space is becoming a limitation.   One of the elements that I want to display is a 2-D array of boolean indicators (rectangular LEDs).  Is there any way to dynamically resize the elements in the array so that regardless of the number of elements, the entire array is always visible and has a constant footprint.  For example, say the array is 8 x 8 elements, and takes up 160x160 pixels on the front panel so each element is roughly 20x20 pixels.  Then the number of elements shifts to 4x4.  I want the display to stay 160x160 pixels, but the size of each element to double to 40x40 pixels.  Is this possible?
    Thanks all,
    Matt
    Solved!
    Go to Solution.

    So thank you for two great ideas/examples.  Definitely think I have a couple of very workable approaches.  I have a follow on question about using the intensity graph approach.
    First some background.  This indicator is going to show the progress of a sorting operation, 1-4 copies of 1-8 unique items are being sorted into 1-32 containers.  The items arrive at the sorter in random order, are identified, and then placed into the container where they are still needed.  The point of this indicator is to show the user, at a glance, how full each container is andwhich componenets are missing.  I want the elements (columns) to appear different for the unique items, which I know you can't do in an array of booleans.  So I had already dumped the boolean approach for an array of colorboxes, and it was the color boxes that I was trying to dynamically size. There is still a boolean array to keep track of if an item has arrived, but that array drives the array of colorboxes where each type of item is color coded by assigning a gray value to colorbox for false, and a particular color if true.  See attached, which works pretty well (detailed adjusts will make it just right).
    I think the intensity graph will look much nicer though, so here is the question:
    How do I map the different colors onto the intensity graph so it looks like the colorbox array without the lines?  The attached get vi puts out a different value for each yes/no, which is to say I already know how to take the boolean and convert the 1 state to a unique number, what I don't know how to do is map that number into a particular color on the intensity graph.
    Thanks guys.
    Super helpful as always!
    Matt
    Attachments:
    Puzzle_MM.vi ‏42 KB

  • Help with displaying images (gif, jpeg...) within a JFrame (or similar)

    Hi all,
    i'm new to the forum and i'll be granted if you kind gentlemen/women could use some advices for my gui home application.
    My purpose is to display a static image in a container (i'd prefer to use javax.swing objects, but if you think that java.awt is more suitable for my app, please feel free to tell me about...). I used a modified code from one of the Java Tutorial's examples, tht actually is an applet and displays images as it is using the paint() method. I just can't realize how to set the GraphicContext in a JFrame or a JPanel to contain the image to display, without using applets. Following part of the code I use (a JButton will fire JApplet start, JApplet is another class file called Apple.java):
    class DMToolz extends JFrame {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JButton jButton = null;
         private JComboBox jComboBox = null;
         private JMenuItem jMenuItem = null;
         private JMenuBar jJMenuBar = null;
         private JMenu jMenu = null;
         private JMenu jMenu1 = null;
         public int w=10, h=10;
         public String filename;
          * @throws HeadlessException
         public DMToolz() throws HeadlessException {
              // TODO Auto-generated constructor stub
              super();
              initialize();
         public DMToolz(String arg0) throws HeadlessException {
              super(arg0);
              // TODO Auto-generated constructor stub
              initialize();
          * This method initializes jButton
          * @return javax.swing.JButton
         private JButton getJButton() {
              if (jButton == null) {
                   jButton = new JButton();
                   jButton.setBounds(new Rectangle(723, 505, 103, 38));
                   jButton.setText("UrcaMado'");
                   jButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
    /**************SCRIVERE QUI IL NOME DEL FILE CON L'IMMAGINE DA CARICARE*******************/
                             filename = "reference table player2.gif";
                           java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                           BufferedImage img = null;
                           try {
                                img =  ImageIO.read(imgURL);
                               w = img.getWidth();
                               h = img.getHeight();
                               System.out.println("*DM* Immagine letta - W:"+w+" H:"+h);
                            } catch (Exception ex) {System.out.println("*DM* Immagine non letta");}
                           JApplet a = new Apple();
                           a.setName(filename);
                           JFrame f = new JFrame ("UrcaBBestia!");
                           f.addWindowListener(new WindowAdapter() {
                               public void windowClosing(WindowEvent e) {System.exit(0);}
                           f.getContentPane().add(a);
                           f.setPreferredSize( new Dimension(w,h+30) );//30 � (circa) l'altezza della barra del titolo del frame
                               f.pack();
                             f.setVisible(true);                      
              return jButton;
    public class Apple extends JApplet {
         private static final long serialVersionUID = 1L;
        final static Color bg = Color.white;
        final static Color fg = Color.black;
        final static Color red = Color.red;
        final static Color white = Color.white;
        public void init() {
            //Initialize drawing colors
            setBackground(bg);
            setForeground(fg);
        public void paint(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            try {
                 String filename = this.getName(); //uso il nome dell'applet come riferimento al nome del file da caricare
                 java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                 BufferedImage img =  ImageIO.read(imgURL);
                 if (img.equals(null)) {System.out.println("IMG null!");System.exit(0);}
                System.out.println("IMG letta");
                int w = img.getWidth();
                int h = img.getHeight();
                resize(w,h);
                g2.drawImage(img,
                            0,0,Color.LIGHT_GRAY,
                            null);// no ImageObserver
             } catch (Exception ex) {ex.printStackTrace();
                                          System.out.println("Immagine non letta.");System.exit(0);}
    }//end classPlease never mind about some italian text, used as reminder....
    Thanks in advance.

    Read the Swing tutorial on "How to Use Labels" or "How to Use Icons" for working examples:
    http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
    By the way you should never override the paint() method. Custom painting (not required in this case) is done by overriding the paintComponent(...) method in Swing. Overriding paint() is an old AWT trick.

  • Display Image

    Apex 4
    Database : 10g EE
    Good day apex users, Im having a hard time in displaying an image in a html region. How can I fetch the image in a database and put it in the html region. I have my blob files stored in my databse I only want to get that files and view it in a html region. How can I do that?
    regards,
    jose

    Hi Jose,
    what is the exact error you are getting from the DML process? Actually that one shouldn't really be used, just the fetch process is relevant.
    To try out the "Display Image" item type,
    1) open the Sample Application,
    2) go to page 6
    3) open the page item "P6_PRODUCT_IMAGE"
    4) change "Display As" to "Display Image"
    5) apply changes
    6) run the page and the image should be visible instead of the "Browse" button.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Displaying images in many rows

    Hello everyone. I have images in my database that I want to
    display on my home page. The issue I'm having is that I want to
    display 7 images per row and have 2 rows. After the first 7 images
    are displayed, I want to start a new row automatically with an
    additional 7 images and don't know how to do that. Can someone
    please help?

    I still cannot get the code to work. Right now it's
    displaying images as one column down the left side of the page.
    <cfset counter = 0>
    <!--- Grab the most recent profiles --->
    <cfquery name="latest_joiners" datasource="db"
    maxrows="14">
    SELECT * FROM db ORDER BY id DESC
    </cfquery>
    <table border="0" cellspacing="0" cellpadding="2"
    width="100%">
    <tr>
    <cfloop query="latest_joiners">
    <td>
    <img src="images/pictures/#pic_path#" height="70"
    width="98" border="1">
    </td>
    <cfif (counter MOD 7) IS 0>
    </tr>
    </cfif>
    </table>
    </cfloop>

  • How to resize display image item?

    How to resize an image in display image item not in column?
    I find a way to resize it in column which similar to this way
    decode(nvl(dbms_lob.getlength(PLAYER_PIC),0),0,null,
    '<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius:
    4px;" '||
    'src="'||
    apex_util.get_blob_file_src('P5_PLAYER_PIC',ROWID)||
    '" height="75" width="75" alt="Player Image" title="Player Image" />')
    detail_img
    but when I try to implement it to display image item which I returned the image from the column, I cant resize it this way, or may be I used wrong syntax, can you please help me finding way to resize it with steps?

    I guess it is because of some carriage returns in your dynamic img tag that is being generated may be not, so make sure there are no breaks half-way through he attributes of the img tag.
    decode(nvl(dbms_lob.getlength(PLAYER_PIC),0),0,null, '<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '|| 'src="'|| apex_util.get_blob_file_src('P5_PLAYER_PIC',ROWID)|| '" height="75" width="75" alt="Player Image" title="Player Image" />')  detail_imgand also inspect the element/img to see if the code is rendered correctly
    Thanks

Maybe you are looking for