Show images stored in DB in browser

Is is mandatory to use intermidia for showing images stored in DB?
I mean,is it possible to use just PL/SQL to show images uploaded to Oracle 8i. If so, how? Does anyone could send me a sample code?
Thanks in advance and best regards.

I have Oracle 8.1.5 and I read that interMedia license is included in DB license.
In this case I am free to use interMedia.
Does interMedia comes with 8.1.5 also?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ymizuno():
You can store images as Blobs in the database, without using interMedia. However, if you store images as OrdImage using interMedia with attributes, you can get many advantages of it. interMedia comes with the Oracle database if you have Oracle 8.1.6. Are there any particular reasons why you do not want to use interMedia? <HR></BLOCKQUOTE>
null

Similar Messages

  • Showing Image Stored In DataBase

    Hello Friends,
    I have images stored in MySQL database. In a blob field. In a desktop application i have used
    blob b=rs.getBlob("Picture");
    byte[] buf=b.getBytes((long)1,(int)b.length());
    ImageIcon imgIcon= new ImageIcon(buf);
    Image img=imgIcon.getImage();
    Graphics g=image.getGraphics();
    g.drawImage(img,0,0,320,240,image);
    the thing worked fine. But now i have to show images over web. I am not able to uderstand that how to show images. As i m unable to get Graphics from any of the component.
    Help Me,
    Its urgent,
    thanking u all
    Abhilash Jain

    The common method to include binary information (image, PDF, document, etc) is to Base64 encode the file and store the resulting character string in the XML. It would be up to the receiving system to handle the encoded information in the XML.

  • Showing image stored in database to XML file

    Hi
    I have an employee portal from where i can take a report of the employee profile .All the details of the employees are in the table.I am storing the image of the employee as BLOB in the table.
    How will i show the image file in my XML file.
    Thanks in advance.
    SRI

    The common method to include binary information (image, PDF, document, etc) is to Base64 encode the file and store the resulting character string in the XML. It would be up to the receiving system to handle the encoded information in the XML.

  • Help........Show image from database

    Hi,
    I am stuck at one point. I have to show image stored in the database on the browser. I am able to fetch the image and show it after storing it in one .gif file. But what I want it is : I don't want to store the fetched image in to a .gif file instead I would like to show the image on the fly after fetching it from the database.
    The reason I need it this way is...If I store it as .gif before showing, after showing the file the file still will be present in the disk, which after sometime will go beyond the limit.
    If at all it is not possible to show it on the fly, then I would like to know if there is any "SESSION ON END" kind of even available in Java so that I can clean up the image when user exits the browser!!!
    Please reply as soon as possible.

    For the first part of your question: If the image is the
    only thing you are showing on the browser.. then
    you can stream the data (I think I never tried with
    gifs)
    try {
         response.setContentType("image/gif");
         ServletOutputStream outf =
    response.getOutputStream();
    // Print the steamed image data to this
    outf
    outf.flush();
         } catch (Exception e){
              System.out.println("Exception Caught"+e.toString());
    }

  • When browsing a new library that I created, the browser shows dotted lines around grey rectangles, no images. When I double click on a rectangle the image appears. How do I get images to appear in the browser rectangles?

    When browsing a new library that I created and exported onto an external hard drive, the browser shows dotted lines around grey rectangles, no images. When I double click on a rectangle, the image appears, but all the other rectangles remain empty - no image. How do I get images to appear in the browser rectangles? I am viewing this on a second computer (an older intel duo iMac), not the one I created the library on (a MacBook Pro). Both computers have Aperture 3.2.4 installed. When I return the external to the MacBook, all images appear in browser rectangles. What's happening on the iMac?

    You may have a problem with the permissions on your external volume. Probably you are not the owner of your library on the second mac.
    If you have not already done so, set the "Ignore Ownership on this Volume" flag on your external volume. To do this, select the volume in the Finder and use the Finder command "File > Get Info" (or ⌘I).
    In the "Get Info" panel disclose the "Sharing & Permissions" brick, open the padlock, and enable the "Ignore Ownership on this Volume" flag. You will have to authentificate as administrator to do this.
    Then run the "Aperture Library First Aid Tools" on this library and repair the permissions. To launch the "First Aid Tools" hold down the ⌥⌘-key combination while you double click your Aperture Library. Select "Repair Permissions" and run the repair; then repeat with "Repair Database". Do this on the omputer where you created the library and where you can see the thumbnails.
    Then check, if you now are able to read the library properly on your iMac.
    Regards
    Léonie

  • Show image in browser

    hi,
    i am new in PHP and oracle. can i show image in browser using image path from database?

    vikash wrote:
    No, Actually I m putting the path of image in database in varchar2 and i want to show image in browser using this path...plz helpGotcha - that actually makes life a little easier...
    What you'll want to do with PHP (I'll lay this out for you a bit - I don't have a code editor/environment handy at the moment..)
    1) You'll retrieve your image path from the database. Note that this path has to be the 'web accessible path', not a full file system path. (e.g. if your "Web Root" is /var/http/www and the full file system path to your image is /var/http/www/images/myimage.png, then the image you should have in the database is /images/myimage.png. This could also be a relative image path, etc.)
    2) Use your retrieved database path to insert into your HTML <img/> tag. If you have 'short tags' enabled, it should look something like this:
    <img src="<?= $myImagePath ?>" />
    That's the basics - is there anything here that sounds familiar?

  • My browser (and preview) doesn't show images in Muse...

    My browser (and preview) is not able to show images hosted on my local server, however when I access those HTML files directly it works; It seems that something is blocking HTTP traffic from my Mac. Please help me find the root cause. Thank you! I am wasting hours on this.

    I've been looking online and others seem to have similar issues but i haven't found any solutions.
    Here's a few screen shots to show others the problem.
    Design Mode:
    Preview Mode (same results from Preview in Browser):
    Published to Test Site:
    If i refresh it a few times in preview I will get bits and pieces of the image to come through.

  • Mail does not show images anymore server stopped responding on my iPad 2 when attempting to browse web

    Over the last couple of days my ipad 2 has started to play up. First the mail would not show images in mail then when trying to browse the web it now will not open any pages. I have attempted a wipe & reload but still no difference.

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).

  • Firefox won't open localhost files, it downloads the file instead and then won't show images, IE9 localhost works fine.

    I have installed XAMPP to preview web pages locally. Everything works fine in IE9 but not in Firefox. When I load a localhost page Firefox downloads the file, then displays the downloaded file without showing images within the page.
    So, in IE9 the address bar looks like this (correctly): http://localhost/my_sites/WebMaestro/Exercises/Lesson8/changeImage.html
    In Firefox the address bar looks like this: file:///C:/Users/Rog/AppData/Local/Temp/changeImage-3.html

    Are you using a Firefox extension like '''Auto Save Document ''' ? If you are using then you need to disable it. The documents are stored as html-text only (no embedded objects like pictures etc.) As a result the images don't appear on browser.

  • Aperture not showing up / displaying in Mail Photo Browser in Leopard 10.5

    This is for anyone who upgraded to Leopard 10.5.1 and wanted to use Mail's Photo Browser to insert Aperture pics into mail messages. At first, it only displayed the iPhoto and Photo Booth folders in Mail's Photo Browser on my Powermac but I remember seeing it in the Apple store.
    If you already generate previews in Aperture, this is pretty much a non-issue. But for me, it frustrated me for a long time. To make it work, the previews must be set in Aperture. I turned it off because it used up extra HD space.
    In Aperture, you need to check the "Share previews with iLife and iWorks" under Preferences. Then decide which size and quality of a preview you want. The larger the size and quality, the better it will turn out when you use it in the photo browser. This dictates the image size and quality of what is imported into your Mail message. (I used the smallest size and a quality of 7, which gave satisfactory results without making the aperture library grow too much). I figured it I wanted to email a large, I could attach it separately via a standard export from Aperture. Don't go too low on the quality as it will not turn out very good.
    Remember to go and generate previews for each folder or pictures, as those are the only ones that will show up in the Mail photo browser. The folders will show up but no pictures if you don't generate the previews.
    It takes a minute before it refreshes in the Mail Photo Browser. Just play with the different settings and put them into your mail to compare the results.

    I had a similar problem and what I found was that I had some corrupt .avi files. Once I removed them all was well. I had to create a new iPhoto library and hunt and peck. I would drag part of the old library into the new library then see if iTunes would see the photos - once it froze then I knew what part of the iPhoto library to look at.
    MJ

  • How can we show image in per_images table in our OAF page?

    Hi All,
    Can any one suggest me how to show the image from per_images table on to OAF page?
    Ihe image is stored as binary value in the table..
    <br><br> Thanks in advance. <br>
    Soujanya

    Go through this thread:
    Re: Displaying an Image stored in the Database as BLOB on OA Fwk Page
    --Mukul                                                                                                                                                                                                                   

  • How to get the path of the image stored in DMS

    Hi everyone..
    My question is that I have attached an image with an order through transaction jha2n..
    Now my requirement is to get the image in report..
    I know the Logical id in ISM_l_ord class and physical id in ISM_P_Ord class.
    I know that link between image and order is in SKWG_BREL.
    But i am not able to get the path so that i can show the image in docking control.
    pls help to retrive the path of the image stored...
    Thanks
    Pooja

    EpicMaster wrote:Now the problem is when I run the application through the .jar file in the dist/ directory the images simply wont load...
    ..lblProduct.setIcon(new ImageIcon("Resources.zip/res/Product.png"));
    Now the problem is when I Build&Clean the whole project which creates a /dist directory containing the complied and execulatble .Jar file for the application AND a folder called "lib" which contains the Resource.Zip folderThe String based constructor to ImageIcon presumes the String represents a File path. File objects do not work with resources inside Jar or Zip archives, for those, you need an URL. Gain the URL using something like..
    URL urlToImage = this.getClass().getResource("/res/Product.png");

  • Image stored in BLOB column crashes report's engine

    Hi,
    I have a report where I display logos stored in a BLOB column on the DB.
    The report is generated as RTF.
    When images have sizes of 624x168 or 423x324 everything is OK. One image, 1221x224, is crashig the report with a dr. Watson error.
    Any idea why?
    The size of the "bad" image file is 38K, and the "good" ones are about 300K.
    Monica

    Sajjad wrote:
    I altered student table to store photoes of students. For this I added STIMG as blob, MIMETYPE,FILENAME,IMAGE_LAST_UPDATE COLUMNS to studentadmitted table. Image stored and displayed in report very nicely. With the following query
    select "ROWID",
    "ST_ID",
    "FIRST_NAME",
    "LAST_NAME",
    "FFIRST_NAME",
    "FLAST_NAME",
    "COURSE_ID",
    "SESSION_ID",
    "CONTACT#" "CONTACT_H",nvl(dbms_lob.getlength(STIMG),0) IMAGE
    from "#OWNER#"."STUDENTADMITTED"
    Images are displayed in column but they have different sizes.Stick to declarative BLOB images as above. They can be resized in reports using CSS. Add a style sheet in the page Inline CSS property:
    td[headers="IMAGE"] img {
      display: block;
      width: 75px;
      border: 1px solid #999;
      padding: 6px;
      background: #f6f6f6;
    }where the <tt>IMAGE</tt> value in the attribute selector is the table header ID of the image column. Setting only one dimension (in this case the width) scales the image with the correct aspect ratio. (The border, padding and background properties are just eye candy...)
    However, if the original images are large then scaling them in the browser this way is a huge waste of bandwidth and produces poorer quality images than creating proper scaled down versions using image tools. Downloading megapixel images and then reducing them to thumbnail size results in pointlessly pushing millions of bytes that will never be seen.
    For improved performance and image quality, and where you require image-specific scaling the best approach is to use the database ORDImage object to produce thumbnail and preview versions automatically. Note that this is not possible in Oracle XE as Multimedia is not included

  • Getting image stored in database !!

    Hey !!
    I'm really trying to solve so much problems i'm having with javafx !!
    So, like the title may suggest, i'm having problems as to get image from the database !!
    Everything seems fine but it tells me that there is "Exception while runing Application"
    here is the code !!
    @James D, i will come back bugging yu again to see how to use the stored images and display them inside the combobox and to render them ^^
    I haven't well understand how well as to use the enum struc in which yu declared the composed <Image,String> type ^^
    import java.awt.image.BufferedImage;
    import java.io.ByteArrayInputStream;
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javafx.application.Application;
    import javafx.event.Event;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.ComboBox;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    import javax.swing.JOptionPane;
    * @author Minedun6
    public class DynamicCustomComboBox extends Application {
        Connection c = connection.ConnecrDb();
       PreparedStatement pst = null;
       ResultSet rs = null;
       ComboBox box1;
       ImageView view;
        @Override
        public void start(Stage primaryStage) {
            box1 = new ComboBox();
            box1.setPrefSize(100, 25);
            box1.setOnShowing(new EventHandler() {
                @Override
                public void handle(Event t) {
                    box1.getItems().clear();
                    try {
                String sql = "select libelle_constr,img_constructeur from constructeurs where libelle_constr='Citroen';";
                pst = c.prepareStatement(sql);
                rs = pst.executeQuery();
               while(rs.next()){
                   box1.getItems().add(rs.getString("libelle_constr"));
                   InputStream input = new ByteArrayInputStream(rs.getBytes("img_constructeur"));
                   Image imge = new Image(input);
                   view.setImage(imge);
            } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
            StackPane root = new StackPane();
            root.getChildren().addAll(box1);
            Scene scene = new Scene(root, 300, 250);
            primaryStage.setTitle("Hello World!");
            primaryStage.setScene(scene);
            primaryStage.show();
        public static void main(String[] args) {
            launch(args);
    }

    In any real application, it's a mistake to mix your presentation (user interface) code with your persistance (database access) code.
    Why? You want maintainability, flexibility, and testability.
    Maintainability:
    Suppose you want to change the structure of your database. E.g. the database admin (which may be you, or someone else) determines that the database design you have is inefficient and needs to be changed. If your database code is scattered over the whole application, mixed in among your user interface code, tracking down what needs to be changed will be a nightmare. If all your database code is in a single class, or perhaps a set of classes in a single package, then the updates are localized and much easier to manage. Furthermore, you can build the new database access code on its own, test it out, and then when you are sure it works just switch your user interface code to use the new persistance layer instead of the old one. The same applies if you decide you're going to use a completely different technology to store the data; perhaps you want to use something like Hibernate instead of plain JDBC, or maybe you decide you want to make the data accessibile via a web service.
    Flexibility:
    What if you (or, more likely, your manager) decides they're going to change to a new user interface technology. Maybe they decide to switch to a web application (i.e. HTML-based) instead of a desktop application. You obviously need to rewrite the user interface code, but you should be able to keep all the database access code you've written. If your database access code is all jumbled up with the user interface code you're replacing, it's going to be way harder to reuse that code. If the two are separated out, you just build a new user interface in whatever new technology you're using, and access the same class(es) you used for your database access without touching them.
    Testability:
    This whole thread is actually a demo of how testability is much harder if you don't properly separate your code. You posted "getting image stored in database", thinking that was your problem. It wasn't; your problem was actually an error in the way you'd set up your JavaFX code. Because the two were completely mixed together, it was hard to know where the error was. The error you had was actually a really simple one; it would have been much easier to see if you had simpler, properly separated code; but because you didn't organize your code like that it took you days to figure out the problem. This was only a couple of dozen lines of code; imagine how this looks in a real application with hundreds or thousands of classes.
    The point is that decisions about how to access your data (standalone database, web service, or EJB?; plain JDBC, JPA, Hibernate, etc?) , and decisions about the presentation technology (desktop or web? JavaFX or Swing?, or Servlets/JSPs, JSF, Swing MVC, or any of a huge number of frameworks) are completely independent. You should be in a position to change those decisions - to redesign aspects of the application - with the least amount of effort possible. Failing to properly design things will make this much harder, or likely completely impossible.
    These are real concerns that affect every application that goes into production.
    Even if you're just making a small application, it will benefit you to set things up correctly from the outset.

  • Display images stored in the database

    I have images stored in the databse. I followed the steps provided in the oracle documentation. Now i want to retrive the image from the database into a java object that can be dislayed in , say, a JLabel. I am able to retrieve the image from the database into the OrdImage in the oracle.java.ord package and view the properties of the image. But unable to retrive the image as such to be displayed.
    Thanking You
    vinay

    This might help...
    import javax.imageio.*;
    import javax.imageio.stream.*;
    import javax.swing.*;
    import java.awt.*;
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.* ;
    import oracle.ord.im.*;
    import java.awt.event.*;
    public class HelloDBImage implements ActionListener{
    OracleConnection con = null;
    JLabel label = null;
    String textFieldString = "Image ID entered";
    public void actionPerformed(ActionEvent e)
    String prefix = "You typed \"";
    if (e.getActionCommand().equals(textFieldString))
    JTextField source = (JTextField)e.getSource();
    ImageIcon imgIcon = createImageIcon(source.getText());
    if (null != imgIcon)
    // Create image Label
    label.setText(null);
    label.setIcon(imgIcon);
    else
    label.setIcon(null);
    label.setText("Image not found! ");
    source.setText("");
    label.repaint();
    //actionLabel.setText(prefix + source.getText() + "\"");
    public ImageIcon createImageIcon(String key)
    Image image = null;
    ImageIcon imgIcon = null;
    try
         // Connect to the database if necessary
    if (null == con) con = connect();
    // Create Input Stream from DB image.
    InputStream is = new BufferedInputStream(
    getDBInputStream(con, key));
    if (null != is)
    // Create Image from Image Input Stream
    ImageInputStream iis = ImageIO.createImageInputStream(is);
    image = ImageIO.read(iis);
    // Create Image Icon from ImageInputStream
    if (null != image) imgIcon = new ImageIcon(image);
    } catch (Exception e)
    System.out.println("exception raised " + e);
         e.printStackTrace();
    return imgIcon;
    public Component createPanelAndContents(String key)
    // Create the image label
    ImageIcon imgIcon = createImageIcon(key);
    if (null != imgIcon)
    // Create image Label
    label = new JLabel(imgIcon);
    else
    label = new JLabel("Image not found! ");
    // Create layout
    GridBagLayout gridBag = new GridBagLayout();
    // Create panel to draw in
    JPanel pane = new JPanel();
    pane.setLayout(gridBag);
    GridBagConstraints c = new GridBagConstraints();
    JScrollPane scrollPane = new JScrollPane(label,
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
    JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1.0;
    c.weighty = 1.0;
    gridBag.setConstraints(scrollPane, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.HORIZONTAL;
    scrollPane.setMinimumSize(new Dimension(300, 300));
    pane.add(scrollPane, c);
    // Add a text field and label to get anoter image
    JTextField textField = new JTextField(10);
    textField.setActionCommand(textFieldString);
    textField.addActionListener(this);
    // Add fields for input
    JLabel promptLabel = new JLabel("Please enter DB key: ");
         pane.add(promptLabel);
    pane.add(textField, c);
    return pane;
    public static void main(String[] args)
    String key = "1";
    try
    UIManager.setLookAndFeel(
    UIManager.getCrossPlatformLookAndFeelClassName());
    } catch (Exception e) { }
    //Create the top-level container and add contents to it.
    JFrame frame = new JFrame("SwingApplication");
    HelloDBImage app = new HelloDBImage();
    if ((args.length > 0) && (args[0] != null)) key = args[0];
    System.out.print("length= " + args.length + "/" );
    if (args.length > 0) System.out.println(args[0]);
    Component contents = app.createPanelAndContents(key);
    frame.getContentPane().add(contents, BorderLayout.CENTER);
    //Finish setting up the frame, and show it.
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);
    public InputStream getDBInputStream(OracleConnection con, String key)
    InputStream is = null;
    try
         int index = 0;
         Statement s = con.createStatement();
         OracleResultSet rs =
         (OracleResultSet)s.executeQuery("select * from images " +
    "where item_id = " + key );
         if (rs.next()) // Just get first image if more than 1.
         index = rs.getInt(1);
         OrdImage imgObj =
    (OrdImage) rs.getCustomDatum(2, OrdImage.getFactory());
    is = imgObj.getContent().getBinaryStream();
    catch(Exception e)
    System.out.println("exception raised " + e);
    e.printStackTrace();
    return is;
    public OracleConnection connect() throws Exception
    String connectString;
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    connectString = "jdbc:oracle:oci8:@orcl";
    OracleConnection con = (OracleConnection)
    DriverManager.getConnection(connectString,"scott",
                        "tiger");
    con.setAutoCommit(false);
    return con;

Maybe you are looking for

  • Can I mimic a 'slide show' of stills and videos with this technique

    I want to be able to mimic an old fashioned slide show on a Blu-ray disk, except that each 'slide' – I'll call them items – could be a true still, or a still with pan/zoom, or even a short video. Whatever a particular item is, I want to click a butto

  • RAW files in Photos with iOS 8

    Has anyone found a solution to the way iOS 8 has slowed down the rendering of RAW files in Photos? This used to be one of the main ways in which I used my iPad and on photo shoots it was very impressive. Now I cannot use it to any effect. I've tried

  • Is there as way to set the Status Byte, other than ibrsv?

    I am trying to emulate an instrument that sets the status byte to 64, but does not assert the SRQ line. Using ibrsv asserts SRQ, which seems to cause problems with my legacy test system. I am using LabWindows/CVI under Windows NT and a PXI-GPIB.

  • What is the name of Apple signature font?

    Hey, what is Apple's signature font called? The one they use to write iMac on the back of the iMac G5 called? cheers

  • OTA Froyo install fails

    I've been looking through the site, but there haven't been too many discussions on this, so I thought I'd ask I've be receiving an error message after I try to install. UPDATE FAILED or INCOMPLETE. Reason: IP_PREVIOUS_UPDATE_FAILED I received the las