This discussion is archived
5 Replies Latest reply: Jul 8, 2012 11:11 AM by Mindmap RSS

beginner in Oracle Multimedia, Please, advise

Mindmap Pro
Currently Being Moderated
Hello friends,

This is my first step in Oracle multimedia, I need to use Oracle multimedia features in Oracle APEX. I am interested only in Watermarking, compression, thumbnail generation for images.
I use Oracle Standard one edition on Win 7 .
I installed Oracle multimedia as elaborated here:
http://docs.oracle.com/cd/E11882_01/appdev.112/e10777/ap_instl_upgrd.htm

Can you please make it short for me, and refer the related docs ??

Best Regards,
Fateh
  • 1. Re: beginner in Oracle Multimedia, Please, advise
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated
    Pl identify exact version of Oracle you have installed and the version of Apex. I am assuming OS is Win 7 Professional or higher, since Home version is not supported for Oracle installs.

    Assuming database version 11gR2, pl read the first line in Section B.2 in the link you posted above - no manual steps are required.

    HTH
    Srini
  • 2. Re: beginner in Oracle Multimedia, Please, advise
    Mindmap Pro
    Currently Being Moderated
    Thanks Srini,
    I use apex 4.1 . apex listener 1.1.3 deployed on Glassfish 3.2. Windows 7 pro machine. Data base Oracle 11g 2 64bit SOE.

    I have been looking for the following since the morning:
    I am working on Timg table with a column with ordimge data type:
    TIMG
    N     NUMBER      
    IMG     BLOB      
    ATTRIBUTES CLOB      
    MIMETYPE     VARCHAR2(4000)      
    WIDTH     NUMBER           
    HEIGHT     NUMBER           
    FILEFORMAT     VARCHAR2(4000)      
    CONTENTFORMAT     VARCHAR2(4000)      
    COMPRESSIONFORMAT     VARCHAR2(4000)      
    CONTENTLENGTH     NUMBER           
    STRANGE     ORDIMAGE
    I need to compress the image on IMG column. I used this procedure:
    DECLARE
     obj ORDSYS.ORDImage;
    BEGIN
     SELECT ORDSYS.ORDImage(img) into obj FROM timg
      WHERE N = 1 FOR UPDATE;
      obj.process(
           'compressionFormat=JPEG,compressionQuality=MAXCOMPRATIO, xScale="2.0"'); 
     -- Update: 
     UPDATE timg SET strange = obj WHERE n = 1;
     
     EXCEPTION
      WHEN ORDSYS.ORDImageExceptions.DATA_NOT_LOCAL THEN
       DBMS_OUTPUT.PUT_LINE('Data is not local');
    END;
    To benefit from that, I have either to display the data of STRANGE column. or I have to extract the blob from OBJ variable !!!!
    But I have not been able to do either of them..
    I search the forums of apex and multimedia, but It was not clear to me..

    Thanks in advance,
    Fateh

    Edited by: Fateh on Jul 8, 2012 10:51 AM
  • 3. Re: beginner in Oracle Multimedia, Please, advise
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated
    Can you please elaborate on your post ? What is a mistake ?

    HTH
    Srini
  • 4. Re: beginner in Oracle Multimedia, Please, advise
    Mindmap Pro
    Currently Being Moderated
    Sorry, I mistakenly checked the thread as answered. When I had to undo that I had to type something. So, i typed "it is mistake", I was about to edit it, but I had to go to do something ....
  • 5. Re: beginner in Oracle Multimedia, Please, advise
    Mindmap Pro
    Currently Being Moderated
    Ok I found it
    DECLARE
     obj ORDSYS.ORDImage;
     img2 blob;
    BEGIN
     SELECT ORDSYS.ORDImage(img) into obj FROM timg
      WHERE N = 1 FOR UPDATE;
      obj.process(
           'compressionFormat=JPEG,compressionQuality=10, xScale="2.0"'); 
     -- Update: 
    img2:=ordsys.ordimage.getContent(obj);
    owa_util.mime_header('image/jpeg', FALSE, NULL);
    wpg_docload.download_file(img2);
    
     UPDATE timg SET img = img2 WHERE n = 1;
     
     EXCEPTION
      WHEN ORDSYS.ORDImageExceptions.DATA_NOT_LOCAL THEN
       DBMS_OUTPUT.PUT_LINE('Data is not local');
    END;

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points