How to store images and video clips in Oracle

All,
Can anyone guide me how to store the images and video clips in oracle through pl/sql and also the way to retirve it.
Edited by: sikander on Sep 7, 2010 3:27 AM

Some sample code
connect sys schema  --if scott has no privs to create directory
--where physical file store in the same machine where database load
CREATE DIRECTORY IMAGES AS 'D:\images';
GRANT READ ON DIRECTORY IMAGES TO SCOTT;
connect scott/tiger
create table my_book_diagrams (Image BLOB);
DECLARE
  v_file_loc BFILE;
  v_diagram_loc BLOB;
  v_diagram_size INTEGER;
BEGIN
  v_file_loc := BFILENAME('IMAGES','Layout.bmp');
  DBMS_LOB.FILEOPEN(v_file_loc );
  v_diagram_size := DBMS_LOB.GETLENGTH(v_file_loc);
  INSERT INTO my_book_diagrams (Image) VALUES (EMPTY_BLOB())
  RETURNING image INTO v_diagram_loc;
  DBMS_LOB.LOADFROMFILE(v_diagram_loc, v_file_loc, v_diagram_size);
END;
commit;

Similar Messages

  • E71 Gallery Images and Video Clips

    Hi there,
    last night I discovered that I am now no longer able to view any images or video clips in Gallery. I had taken some photos over the past few days in various conditions to test the camera out. I went back in to review, which I was able to do only days earlier and now it just sort of hangs and no images are displayed. I can exit out, but it wont show even the preinstalled images. The same thing happens with video clips.
    Has anyone else came across thie problem and/or have a solution?

    Nokia phones are unable to play MP4 files, or any other video file with the exception of Real Video files.  The video file MUST be packaged thru Real Player.  1 of 100 MP4 files will play, but typically the phone CANNOT even see that the MP4 file is on your memory card.  
    The issue is a problem with the firmware on the phone,  You can view the MP4 files on all phones and all computers, but not Nokia.  Nokia is history, yet they keep building phones that look new and have new features, but they only work with antiquated files formats.  Furthermore
    the features that actually work are typically crippled by patent infringment issues.
    The Nokia suite will not work with windows.  Typically Nokia suite will open and freeze.  Again a software issue totally ignored by Nokia, because selling a new phone is not contigent on making all the features work.  They proudly list the features on the package, but for the most part the features you paid for are not going to work correctly, and most often not at all.
    To get a video file to to work on the E71, your best bet is to take the loss, throw the phone in the garbage and by a different brand.  If you insist on getting videos to play on the E71 disaster, make sure to run your files thru Real Player and convert to a '.RV' file.  The format is ancient, but they will work most of the time.  The file size is massive compared to todays standards as well, so buy a massive memory card, but remember the E71 has a tiny limit of 8 gig.  You can then use file manager on your computer to transfer the files to your memory card on the phone.  DO NOT try to use nokia software with Windows to transfer files, simply put, you will waste hours, and in the long run it will work about 10% of the time at best.
    Nokia has been on the brink of bankruptsy for a while, and it will not be long now.

  • How to store image in  binary format in oracle

    hi friends.
    i want to store image directly in oracle using blob data type. i have a procedure which stores the stores the path . but i want to laod the full iamge .
    pls suggest me .
    thank you

    See:
    http://www.oracle-base.com/articles/8i/ImportBlob.php

  • How to add image and videos in jframeusing netbeans..

    hi. im using netbeans where you can create a jframe form by just dragging and dropping items... can someone help me how to add an image? what item should i drag onto my jframe? help me pleasee...

    demo:
    import java.net.*;
    import javax.swing.*;
    public class ImageExample implements Runnable {
         public void run() {
              URL url = null;
              try {
                   url = new URL("http://blogs.sun.com/roller/resources/jag/SouthParkJAG-small.png");
              } catch (MalformedURLException e) {
                   throw new RuntimeException(e);
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(new JLabel(new ImageIcon(url)));
              f.pack();
              f.setLocationRelativeTo(null);
                    f.setVisible(true);
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new ImageExample());
    }

  • How to store .doc and .pdf files in oracle

    pls anyone give me exact procedure for storing .doc & .pdf files in oracle table data types etc...

    See here for an example
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:232814159006

  • How do i blend image and video on premier?

    Hello Everyone
    I'm trying to add a video onto an image on Premier. I want the image to be still and the video to play in the background. How do I make an image and video blend together in Premier?
    Any tips/effects to make this look more interesting? for my project I'm trying to add a disturbing footage from the news onto a landscape photograph.
    I'm using pro 5 on an Imac
    Thanks in advance

    Video on track one.  Image on track two.  Use the motion property to locate and size the image.

  • How can I email a video clip I downloaded into my iPhoto library to my friends? I tried creating an email and attaching the clip but there is no sound and no picture when the 5 minute attachment "plays." How can I file= export it to them from iPhoto?

    How can I email a video clip I downloaded into my iPhoto library to my friends? I tried creating an email and attaching the clip but there is no sound and no picture when the 5 minute attachment "plays." How can I file=>export it to them from iPhoto?

    Have them install Quicktime on their PC's from Apple's website, that's the easiest fix.

  • HT5148 i am using final cut pro x. i have imported some images and video in my timeline. when i play back my video it looks fuzzy. but, when i pause it, it looks clear. how do i get my video to play clear.

    i am using final cut pro x. i have imported some images and video in my timeline. when i play back my video it looks fuzzy. but, when i pause it, it looks clear again. how do i get my video to play clear and not fuzzy?

    Same reply.

  • How to add a 'Download' feature in image and video gallery?

    Hello,
    I have created an image gallery on one screen and placed few videos on another screen.
    Now, I want to add a download feature in photos & footages both.
    Does anyone know how so I do that?
    Prompt response will be highly appreciated.
    Thanks in advance.
    Jay

    Hi,
    Could you please provide additional information on what you mean by Download feature ? Where do you want to download these images and video from ?
    Olivier

  • How to include zoom option for images and video in adobe captivate5?

    I am developing an elearning software with captivate 5 which has images and video.
    I want to include an option to be able to zoom the images and video if clicked on the particular area.
    It should zoom any part of the image when clicked on it during run time and go back to original size when clicked again.
    How can I do this?

    1. I try with two images: The thumbnail y the Big Image Zoom image Detail.
    2. I Use Dinamic Images
    3. check this tip

  • How to store images in database and retrieve them back to page?

    Well I don't know how to store an image file to a database (say MSSQL) from the JSP and retrieve it back whenever needed and put it on the JSP page? Please help me.

    I am not sure how to store images in database but what you can do is store the image into particular folder using FileOutputStream and its unique name into the database...and than retrieve it from the folder using that name retrieved from database...
    <%
    response.setContentType("text/html");
    response.setHeader("Cache-control","no-cache");
    String err = "";
    String lastFileName = "";
    String contentType = request.getContentType();
    String boundary = "";
    final int BOUNDARY_WORD_SIZE = "boundary=".length();
    System.out.println("contentType --> "+contentType);
    System.out.println("BOUNDARY_WORD_SIZE --> "+BOUNDARY_WORD_SIZE);
    if(contentType == null || !contentType.startsWith("multipart/form-data"))
    err = "Ilegal ENCTYPE : must be multipart/form-data\n";
    err += "ENCTYPE set = " + contentType;
    else
    boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
    System.out.println("boundary --> "+boundary);
    boundary = "--" + boundary;
    try
    ServletInputStream sis = request.getInputStream();
    byte[] b = new byte[1024];
    int x=0;
    int state=0;
    String name=null,fileName=null,contentType2=null;
    java.io.FileOutputStream buffer = null;
    while((x=sis.readLine(b,0,1024))>-1)
         System.out.println("************ x ********** "+x);
         String s = new String(b,0,x);
                   System.out.println("************ s ********** \n"+s);
         if(s.startsWith(boundary))
         state = 0;
         System.out.println("name="+name);
         System.out.println("filename="+fileName);
         name = null;
         contentType2 = null;
         fileName = null;
         else if(s.startsWith("Content-Disposition") && state==0)
              System.out.println("-- 1 --");
              state = 1;
              System.out.println("s.indexOf(filename=) --> "+s.indexOf("filename="));
              if(s.indexOf("filename=") == -1)
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
                   System.out.println("after name substring 1 "+name);
              else
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
                   System.out.println("after name substring 2 "+name);
                   fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
                   System.out.println("fileName --> "+fileName);
                   //String fileName1 = s.substring(s.indexOf("filename=") + "filename=".length(),s.length());
                   //System.out.println("fileName1 -->"+fileName1);
                   if(fileName.equals("\"\""))
                   fileName = null;
                   else
                        String userAgent = request.getHeader("User-Agent");
                        System.out.println("userAgent --> "+userAgent);
                        String userSeparator="/"; // default
                        if (userAgent.indexOf("Windows")!=-1)
                        System.out.println("test --> "+"\\");
                        userSeparator="\\";
                        if (userAgent.indexOf("Linux")!=-1)
                        userSeparator="/";
                        System.out.println("userSeparator "+userSeparator);
                        System.out.println("fileName before inserting userSeparators "+fileName);
                        fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
                        System.out.println("fileName after userSeparators "+fileName);
                        if(fileName.startsWith( "\""))
                        fileName = fileName.substring( 1);
              name = name.substring(1,name.length()-1);
              System.out.println("name 2 --> "+name);
              System.out.println("final file name "+fileName);
              if (name.equals("file"))
                   if (buffer!=null)
                   buffer.close();
                   lastFileName = fileName;
                   buffer = new java.io.FileOutputStream("/Documents and Settings/sunil/Desktop/images/"+fileName);
         else if(s.startsWith("Content-Type") && state==1)
                             System.out.println("-- 2 --");
              state = 2;
              contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
              System.out.println("contentType2 --> "+contentType2);
         else if(s.equals("\r\n") && state != 3)
                   System.out.println("-- 3 --");
              state = 3;
         else
              System.out.println("-- 4 --");     
              if (name.equals("file"))
              System.out.println("Final x :: "+x);     
              buffer.write(b,0,x);
    }     // while closing
    sis.close();
    buffer.close();
    }catch(java.io.IOException e)
    err = e.toString();
    boolean ok = err.equals("");
    if(!ok)
    out.println(err);
    else
    %>
              <SCRIPT language="javascript">
              history.back(1);
              alert('Uploaded <%=lastFileName%>');
              window.location.reload(false);
              </SCRIPT>
    <%
         out.println("done");
    %>
    </BODY>
    </HTML>
    I think it will solve ur problem..

  • How to set restriction on shared folder to copy or move images and videos

    Hi,
    I am using windows server 2008 for file sharing, it's simple folder sharing and there is no additional roles added and not promoted as file server.
    Users have permissions to access folder and they can put data on shared folder but I want to restrict user that they can not copy any images and video on it.
    Need urgent help to stop copying images and videos on shared folder.

    If you need to restrict only certain types of files, then file screening is what you need. Windows Server 2012 R2 comes with a powershell module for FSRM, so you can script configuration of file screening.
    The code will look like the following (this is only an example):
    New-FsrmFileGroup -Name "Images and Videos" –IncludePattern @("*.jpg", "*.mpg", "*.avi", "*.tif", "*.mp4", "*.mov")
    $Notification = New-FsrmAction -Type Email -MailTo "[Admin Email];[File Owner]" -Subject “Warning: attempted to create a video or image file” -Body “You attempted to create a video or image file on a share that does not allow storage of this type of files.” -RunLimitInterval 120
    New-FsrmFileScreen -Path "C:\Shares\FileShare1" –IncludeGroup "Images and Videos" -Notification $Notification -Active
    Gleb.

  • How to use Image Capture to transfer images and video from Iphone

    I was wondering if I can use the program Image Capture to transfer image and video files from my Iphone? I set up my iphone to be synced with my laptop and tried opening up Image Capture and the program does not read any device attatched. However once I tried connecting my iphone to my imac and Image Capture opened up automatically. Would it be because my iphone is synced with my laptop that prevents it from reading in Image Capture? Any input would be appreciated!

    On your laptop, open iPhoto and check it's preferences > General, "Connecting camera opens ..." The available choices are iPhoto, Image Capture, or no application. Make sure it's set correctly.
    Here's a support document that may be useful: Copying personal photos and videos from iPhone, iPad, or iPod Touch to your computer, http://support.apple.com/kb/HT4083

  • IMovie11 - MARKING PHOTOS AND VIDEO CLIPS USED IN PROJECTS

    After endless research, I have finally figured out how to mark the photos and video clips I have in my project so that I don't duplicate them in my project. It's actually easy once you know how to do it.
    1. Create your new project (Movie)
    2. Create your event with the photos and videos you want to use from iPhoto. Name your event same as your Project to make it easier to find the event for that project. The work flow will be > Event > iPhoto Library  > Albums > Select the entire Album or individual items.
    iMovie will not mark any photo or video that is not stored in iPhoto, so make sure you have your Photos and Video stored there. You can always delete any media later you don't want to keep. I found it easiest to organize the media I will be using in a project into an Album, and give it a name relating  to your Project so you know where they're at, and you don't have to sort through your entire iPhoto collection to find them.
    3. Now you have your Photos / Video in your event.
    * As you ad the media to your project, an ORANGE line will appear on the media indicating you used it in the project you currently have open.
    * If you see a PURPLE line on any of them, that indicates they are used in a different project you have created. >>> See Attachment ...
    Remember that you will only see these mark lines in events.

    If you don't want iDVD to show its theme or menu then go into the Map mode in iDVD and drqg the slideshow containing the photos and video clips into the blue Auto Play bin at the left.
    Click to view full size
    When inserted into a DVD player it will begin playing immediatey.  However, when findished it will fall back to the menu so use the menu which would look best for the situation.  They can be modified by droppiing image files into the menu settings bin to give it a different background.
    Make sure your photos and video clips end up  in the slideshow together:
    Click to view full size
    OT

  • Only want to transfer NEW images and videos to N70...

    Im using PC Suite 6.80.22 and when i try to transfer all of my images and videos over using "image store" it will only transfer the whole lot over.
    How can I set it so that it only transfers the new images and videos? Otherwise, I end up with duplicates, triplicates etc.
    Thanks,
    Billy

    update pc suite to 6.81.13, it fixes the problem

Maybe you are looking for