Images stored in BLOB, any good????

We are planning on storing images in a Blob data type, any issues with using blobs?
We will only be storing Tif images (<2 megs each). Anybody have good or bad experience using the Blob data type.
How easy is it to manipulate the images once they are inside Oracle in a Blob data type. Let say that we plan on moving all the images that are in Oracle to a document imaging tool in about a year, will this be easy to do.
Any help would be appreciated.
Guy

I'm using Oracle 8.1.7

Similar Messages

  • Problem in displaying images stored in Blob variable

    Hi all,
    I have a requirement where i need to retrieve the image stored in Blob variable in DB and display the image in JSP page.
    I have written the below code to achieve this, it works fine
    In JSP, I am calling a action in the <img tag
    <img src='downloadPhoto.page?method=getPhotoInBytes&accessoryModelPictures.id.accessoryNumber=${photo.id.accessoryNumber}/> In my controller class
    InputStream inputStream=accessoryPicturesLOB.getPicture().getBinaryStream();
    byte[] theBytes = new byte[inputStream.available()];
    inputStream.read(theBytes);
    response.setContentType("image/jpg");
    response.getOutputStream().write(theBytes);But the problem is, *if i right click on the image and select save picture as option i get a error saying "The system cannot find the specified file "*
    Can you please tell me what is wrong in my approach/code
    Is there any better approach to display image that is store in Blob variable ?
    Please help on this.
    Thanks in advance.

    You need at least to set the filename in the content disposition header.

  • 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

  • Radio Button group with images stored as BLOB files in database

    Hey all!
    I have radio button group, my idea is that radio button's LOV must display images, I mean BLOB files stored in a table.
    How can I do this?

    Hello Ken,
    I asked similar question in the past, and I believe the answer is still the same.
    Select List as an option of a Radio Group
    In your case, I think you can use a select list with added functionality, like "Select List with Branch to Page" or "Select list with Submit", or you can just attach an onChange event (JavaScript) to each select list. The effect should be similar to a radio group – as soon as the user select one item from any of the select lists, you can fire some action, based on the select list value.
    Hope this can help,
    Arie.

  • Displaying the image stored in Blob column

    Hi all,
    I'm trying to print the report with an image. I've stored the image in a Blob column and the format of the image is Jpg.
    I'm using the Reports 10g(10.1.2.0.2). When I'm trying to print the report, I'm getting an error Rep-62203. I want to know whether there are any settings which i need to set to display the image item. I mean to say that are there any registry settings.
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Dec 1, 2008 12:55 PM

    Hi all,
    I'm trying to print the report with an image. I've stored the image in a Blob column and the format of the image is Jpg.
    I'm using the Reports 10g(10.1.2.0.2). When I'm trying to print the report, I'm getting an error Rep-62203. I want to know whether there are any settings which i need to set to display the image item. I mean to say that are there any registry settings.
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Dec 1, 2008 12:55 PM

  • Display images stored in BLOB in html pages via JSP

    Hello,
    My images are stored in BLOB column of other base than portal.
    in JSP i have to display them in html pages.
    anybody have already did the same thing ?

    teggvb6,
    I believe you should be able to get it to work by doing the grants to the user specified in the DAD (i.e. the user that is logging into Oracle) rather than PUBLIC (someone else may correct me on this?).
    If you're concerned that the procedure could be called by others then I guess you could do some sanity checking within the procedure, for example checking v('APP_USER') or maybe v('SESSION') or perhaps do something clear with the REFERER http header? I haven't thought this through yet but I'm pretty sure you should be able to tie it down a bit more.

  • Inserting images stored as BLOB in table to Oracle Report(10G)

    We have some oracle reports(rdf) built in Oracle 10g. Now we are planning to update these reports to include images stored as pdf's on file system. We have loaded these pdf's as blob into tables. Is there a way to include these image/s into the reports.
    Thx.

    Easy answer: No, this is not possible. You can't show a PDF inside your report.
    Since you are talking about just images, why do you even store these images as PDF? Why not as JPG or PNG (if you need best image-quality)?
    Using a normal image in a report would be no problem at all.
    Complex answer: Yes, this could be possible with an enormous effort.
    You could write yourself a Java-Bean which reads the BLOB, uses something like "iText" to convert the PDF to a normal image, and then display this image.
    I want to recommend to not use this solution since it introduces a really big complexity into you report where the usual solution of just storing images as images and not PDFs would give you a better result (and way better performance).
    Regards
    Markus

  • Loading images stored as BLOBs in MySQL

    Hello,
    For various reasons, I would prefer to store binary data like images and videos as BLOBs within a MySQL database and have Flash retrieve that content directly from the database as opposed to getting it from a URL on a fileserver. So, I have written a PHP script that Flash calls which does a database query and returns the bitmap data from the BLOB. I have verified that the image data is being sent from the database through the PHP, but Flash either doesn't display the image or gives me an error saying that it is an unknown type.
    Here is the AS3:
    var imageLdr:Loader = new Loader();
    //imageLdr.dataFormat = "binary";
    imageLdr.load(new URLRequest("http://www.XXXXXXXXXX.com/cgi/getToken.php"));
    imageLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadImage, false, 0, true);
    function loadImage(evt:Event):void {
        trace("Now in loadImage...");
        tokenHolder.addChild(imageLdr);
        addChild(tokenHolder);
        trace("loadImage complete...");
    Here is the getToken.php file code:
    <?php
    $hostname = "dbhost";
    $username = "username";
    $password = "pword";
    mysql_connect($hostname, $username, $password) or die ("<html><script language='JavaScript'>alert('Unable to connect to database'),history.go(-1)</script></html>");
    mysql_select_db($username);
    $query = "SELECT content FROM media WHERE id=2";
    $result = mysql_query($query);
    $data = mysql_result($result, 0);
    $im = imagecreatefromstring($data);
    if ($im !== false) {
        header('Content-Type: image/png');
        imagepng($im);
        imagedestroy($im);
    else {
        echo 'An error occurred.';
    ?>
    Is there a way to get Loader() to accept bitmap image data that is retrieved from a BLOB in a database? Should I try to get PHP to mimic the response from an HTTP server or is there another way to load bitmap data stored as a BLOB into a display object?
    Thanks!

    Hey
    Thanks for sharing your problem and how you get data as image in php. It gave me clue about my problem about getting blob info from database to as3 and displat it as image. So what i did is:
    In this fuction;
    function  loadImage(evt:Event):void {
        trace("Now in loadImage...");
         tokenHolder.addChild(imageLdr);
        addChild(tokenHolder);
         trace("loadImage complete...");
    I changed it to:
    public function loadImage(evt:Event):void {
                    trace("Now in loadImage...");
                    img= evt.currentTarget.content as Bitmap;
                    trace("loadImage complete...");
    img is a Bitmap variable and I used Image component and stated its source as imgg ( source={img} )
    I hope you can solve your problem
    Have a good day...

  • Displaying images stored in blob columns

    I've seen discussions on how to upload and download blob columns but I want to store a blob in the database and be able to display the blob (which is a jpg) as I would any other <img> on my web page. Instead of having to store the jpg on a file system somewhere, and use the data in the database to formulate a link to the image on the file share, I want to pull it right out of the blob. Does someone have a sample of how to do this? Can I do this?
    Thanks

    Laurence,
    If you uploaded the image via the Application Builder, you can use an image tag like so:
    &lt;img src="#WORKSPACE_IMAGES#my_image.jpg" /&gt;If you followed the upload/download how to, you should be able to reference an image like this:
    &lt;img src="download_my_file?p_file=1232897645" /&gt;Where 1232897645 is the unique ID of the uploaded image. To make referencing images easier, you could write a version of the download_my_file procedure that takes in the name of the image as a parameter.
    Sergio

  • Uploading image stored in blob & retrieving to disk

    Hi there...
    Any help will be much appreciated !!!
    I have the following to tasks that I needhelp figuring out:
    I'm using the intermedia WebAgent and interface with
    a jsppage.
    1. I have a table with a field that store images. The field
    isdeclared as blob datatype. My task is to upload images to the
    database from a client side and store it in to server db in this field.
    The examples thatI've got from technet are using fields declared
    as ordImage.
    Can you give me example on how to do this when the db field is a blob ?
    2. On the other problem, I need to retrieve an image from the same field,
    but be able tostore it directly to a local disk at client side.
    Again, the examples I haveis on displaying the image directly on
    the web page.
    Can you give meexample or way how to retrieve the image and store it
    directly to the disk?
    Thanks..
    null

    Some usefull code examples are available @ :
    http://technet.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm
    and
    http://technet.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java
    hope these help

  • Print image (stored in BLOB in database) on the margin - Oracle Reports 6i

    Hi all,
    I would like to print an image with is in the database as BLOB field.
    I can not retrieve the image with a query in the data model because the column will not have the correct frequency to appear in the margin.
    I can not retrieve the image in trigger reports because I can not store the result in parameter or placeholder columns can not take BLOB.
    How can I do that?
    Thanks.

    Hello,
    I have achieved this by doing so:
    In Data Model:
    Create a query where you select the blob (ideally 1 record). A group will be created.
    In Layout Model:
    Create a repeating frame in the margin, set the source to group based on query where blob is retrieved.
    Insert a field in the repeating frame, set Source to blob field and File Format to Image.
    Regards,
    Avinash

  • Reports JFIF image stored in a blob

    Hi everyone,
    I'm using forms & reports 10g release 1. I noticed that a image stored in a blob with a format of JFIF doesn't work well with in Reports. I get the rep-62203, cannot render error. When the datatype is longraw instead of blob, it works fine. But I can't use longraw, because built in in pl/sql doesn't allow to read the field passe 32K. So that's why we convert to Blob.
    I made a few test: 1) I stored a simple jpg with Toad and It work fine with Reports. I stored with a form but of a format of GIF it works fine. But the JFIF just doesn't work reports. What's the problem?
    How can this be solve?
    I thought maybe saving the image prior calling the report into a file and then link it with report. That will be my last choice. I prefere not to got there.
    Any idea?

    Hi,
    We finnally succeeded. Dsegard gave us the right solution. <div>It was the setup of the display that was on error. We use VNC as the display. Now the display is set correctly and the reports shows up fine.
    By seting REPORTS_DEFAULT_DISPLAY=NO, It did work for both the server and the local host.
    Thank you dsregard.</div>

  • Blob problem (Image storing or Currupted )

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • BLOB problem (image storing or image curruption)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • Image not displayed programmtically stored in blob column

    Hi,
    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.
    To control this I modified the query like this
    select "ROWID",
    "ST_ID",
    "FIRST_NAME",
    "LAST_NAME",
    "FFIRST_NAME",
    "FLAST_NAME",
    "COURSE_ID",
    "SESSION_ID",
    "CONTACT#" "CONTACT_H",decode(nvl(dbms_lob.getlength(stimg),0),0,null,
    '<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '||
    'src="'||
    apex_util.get_blob_file_src('P16_stIMG',st_id)||
    '" height="75" width="75" alt="Product Image" title="Product Image" />')
    detail_img
    from "#OWNER#"."STUDENTADMITTED"
    Report did'nt run with following error,
    report error:ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Win Server 2008
    Oracle Database :11G R2
    Apex Ver :4.2
    Sajjad

    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

Maybe you are looking for