Query on ORDSYS.ORDIMAGE object

Can we extract part of images with SQL or PLSQL from an ORDIMAGE object ?
ie. you give the upper left coordinate, width & heigth and you get only the part of the image you want ...
Thanks for your help.
Francois

Hi,
You can use interMedia to crop or cut images using the process or processCopy methods. For more information, see Oracle interMedia Audio, Image, and Video User's Guide and Reference Release 8.1.7, specifically, the cut command of the process method. Note, if you need to preserve the original image, then use the processCopy method, which will copy the original image to a new ORDImage object, then process it as requested, leaving the original image intact. You can also do this from a Java application. For more information, see Oracle interMedia Audio, Image, and Video Java Classes User's Guide and Reference Release 8.1.7, specifically, the process method.
Hope that helps.
In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, how you are developing and deploying your application, and any new functionality you'd like to see added to Oracle interMedia. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected] Thank you!
Regards,
Simon
null

Similar Messages

  • How to create ordsys.ordimage object?

    Hallo,
    i want to create an ordsys.ordimage object in a table function. The interesting part of my code looks something like this:
    b_picture ORDSYS.ORDImage;
    temp_picture ORDSYS.ORDImage;
    i number := 0;
    FETCH myCursor INTO b_id, b_bild, b_signatur;
    EXIT WHEN myCursor%NOTFOUND;
    temp_picture := ORDSYS.ORDImage.init();
    b_picture.processCopy ('fixedScale = ' || pixel_x || ' ' || pixel_y);
    The temp_picture object shell be given back of the table function. But if I call this function the last printed line throws this exception:
    ORA-29400: Data Cartridge-Fehler
    IMG-00710: In Zielbild kann nicht geschrieben werden
    ORA-06512: in "ORDSYS.ORDIMG_PKG", Zeile 525
    ORA-06512: in "ORDSYS.ORDIMAGE", Zeile 59
    ORA-06512: in "TESTER.AUFLOESUNG_ANPASSEN", Zeile 31
    ORA-06512: in "TESTER.BILD_IN_AUFLOESUNG", Zeile 14
    I suppose temp_picture isn't initiated correctly. But how should this be done?

    I just saw, that I made a mistake when translating my source code. The last line looks like this, of course:
    b_picture.processCopy ('fixedScale = ' || pixel_x || ' ' || pixel_y, temp_picture);
    Christian

  • Cann't export ORDImage object with ORDSYS.ORDSOURCEExceptions

    I have a table used ORDSYS.ORDIMAGE object. Now, i want to export images to file system with PLSQL.
    PROCEDURE exp_img(pid IN VARCHAR2) IS
    local_image ORDSYS.ORDIMAGE;
    filename VARCHAR2(10);
    img_location varchar2(200) := '.../living/images/';
    ctx RAW(32767) := NULL;
    BEGIN
    SELECT NEWSPICT
    INTO local_image
    FROM INFO_DIRECT_IMG
    WHERE NUMID = pid;
    filename := 'smict.jpg';
    if (local_image.isLocal) then
    local_image.export(ctx, 'FILE', img_location, filename);
    end if;
    END exp_img;
    The intermedia version is 9.2.0.1.0, and I have granted the permissions to the ORDSYS and ORDPLUGIN. But when i execute the procedure, I caught the ORDSYS.ORDSOURCEExceptions.SOURCE_PLUGIN_EXCEPTION exception.
    why?
    and how can I fix it?
    Thanks!

    img_location should be the name of a directory object in Oracle. Read the documentation again. You should see the following commands.
    connect sys/<password> as sysdba
    create or replace directory my_location as '/some/directory/path';
    now the call to export would look like
    img.export(ctx, 'FILE', 'MY_LOCATION', 'foo.jpg');
    note that MY_LOCATION is uppercase. This is because database object names (like the directory name we created) are automatically upcased in the default.
    you can also use your variable like so:
    img_location varchar2(200) := 'MY_LOCATION';
    note that it references the name of the directory.
    then
    img.export(ctx, 'FILE', img_location, 'foo.jpg');

  • Diplaying of ordsys.ordimage field in a Report based on Query

    Hi,
    I have a table with a ordsys.ordimage field, where I am uploading images. I created a custom report based on that table but I just cant seem to find a way to show images in it. Could anyone please tell me how to do this.
    I tried using this
    "portal30.wwv_user_utilities.get_intermedia('CP_IMAGE01','CP_IMAGE01','IMAGE',rowid) the_picture " but this does not help at all
    Thanks!
    vimpi

    Hello Prajwal,
    It is definely possible !!
    If you have already created your query pls paste the same here so that I can help you otherwise. I will give you a general guidelines and you can take it from there..
    Using the CASE Statement inside your SELECT you can achieve this.
    SELECT T1.ItemCode AS 'Item No.', T1.ItemName AS 'Item Description',
    CASE WHEN  T1.QryGroup1 = 'N' THEN T0.Price ELSE 0 END 'List Price'
    FROM  [dbo].[ITM1] T0  INNER  JOIN [dbo].[OITM] T1  ON  T1.ItemCode = T0.ItemCode   WHERE T0.PriceList = 1

  • How to build a report on a table containing ORDSYS.ORDIMAGE type?

    Hi
    I build a table with a column of type ORDSYS.ORDIMAGE then I
    build a form using wizard and populate the table by uploading
    intermedia type and I can make query on that form and see the
    image. But when I build a report using wizard, the report result
    shows image data as it is in text format.
    Am I doing something wrong or there is another way to make
    report on ORDSYS.ORDIMAGE column type.
    Thanks.
    bye

    This could be because, you might have the display type as text
    instead of html for this column.
    Could you pls verify this by selecting as html and try running
    the report. If it still not working then pls post your Portal
    Version so that we can verify it out here. Presently, it is
    working fine for me.
    Thanx,
    chetan.

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • ORDSYS.ORDIMAGE vs BLOB

    Dear all,
    I've designed a table with an ordsys.ordimage field for images. BIG MISTAKE, because there is no possibility to upload images from a form. I'd like to change it into a BLOB field but an error arises:
    "You cannot modify the column definition for types CLOB, NCLOB, BFILE, BLOBand Intermedia Object types(ORDSYS.ORDIMAGE, ORDSYS.ORDAUDIO, ORDSYS.ORDVIDEO). (WWV-17079)"
    Could I change it anyhow in order not to build a new table? I have a lot of forms referring to that table and I should change these forms too....(and we know it is pretty difficult)...
    I would appreciate any help.
    Tomas

    And you are possible to display blob from table in form s image item?
    I tried this, but it didn't go, can you tell me, how did you do?

  • Selecting from ORDSYS.ORDImage field

    I have a table which contains a photo field of type ORDSYS.ORDImage. I can select images from that table to a report from query wizard, because there in display option you can check "Embed interMedia rich content in the report" -option. That option does not exist in reports from SQL query. So how can I select these images to a normal SQL report?? Is it even possible?
    null

    Does somebody have any ideas how to do this?
    I also tried to show ORDIMAGE in SQL query based report but with no success.
    Thanks in advance!

  • Help me with ordsys.ordimage

    i have problems when using interMedia to import images on DB server.
    i have 2 tables :
    create table t( pic_id number, pic_ord ordsys.ordimage);
    create table demo(id number, b BLOB);
    create directory PICDIR as 'd:\pic'; --- this directory is correct on server;
    grant read on directory PICDIR to PUBLIC;
    commit;
    DECLARE
    img ordsys.ordimage;
    ctx raw(4000);
    BEGIN
    insert into t values(1,ordsys.ordimage.init());
    select pic_ord into img
    from t
    where pic_id=1 for update;
    img.setSource('FILE','PICDIR','1.bmp');
    -- set source is OK,but the following IMPORT() raises exceptions
    img.import(ctx);
    img.setProperties();
    update t
    set pic_ord=img
    where pic_id=1;
    commit;
    end;
    ERROR at line 1:
    ORA-29400: data plug-in error IMG-00002:
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 590
    ORA-06512: at "ORDSYS.ORDIMAGE", line 65
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 677
    ORA-06512: at "ORDSYS.ORDIMAGE", line 213
    ORA-06512: at line 16
    =====================================
    after millions of times trying that ,i tried to load the file into a blob,
    and copy from blob to ordsys.ordimage.source.localdata(this is a blob);
    see:
    DECLARE
    l_blob blob;
    l_file bfile;
    BEGIN
    delete from t;
    insert into demo values(1,EMPTY_BLOB())
    returning b into l_blob;
    l_bfile := bfilename( 'PICDIR', '1.bmp');
    dbms_lob.fileopen( l_bfile );
    dbms_lob.loadfromfile( l_blob, l_bfile, dbms_lob.getlength( l_bfile ) );
    dbms_lob.fileclose( l_bfile );
    end;
    succeed!
    SQL> select id, dbms_lob.getLength(b) from demo;
    ID DBMS_LOB.GETLENGTH(B)
    1 1963494
    ===================================================
    then i copy the blob into t.pic:
    insert into t
    ( select id, ordsys.ordimage(ordsys.ordsource(b,NULL, NULL, NULL, SYSDATE, 1 ),
    NULL, NULL, NULL, NULL, NULL, NULL, NULL )
    from demo
    ==================================================
    then i check the blob's size in ordimage,and use setProperties() :
    declare
    img     ordsys.ordimage;
    ctx     raw(4000);
    begin
    select pic into img
    from t
    where pic_id= 1 for update;
    dbms_output.put_line('ord blob length:'||dbms_lob.getLength(img.source.localdata));
    img.setProperties();
    update t
    set pic=img
    where pic_id=1;
    commit;
    end;
    ord blob length:1963494
    declare
    ERROR at line 1:
    ORA-29400: data plug-in error:IMG-00002:
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 590
    ORA-06512: at "ORDSYS.ORDIMAGE", line 65
    ORA-06512: at line 10
    i do not know the mechanism of data plug-in. but i suppose it's the configuration's error of my oracle DB.
    please help me!!
    [email protected]

    Thank you!
    My db version is 9.0.1.0.1
    interMedia version 9.0.1.0.1
    i thought it's the installation error, but i have tried the /ord/im/admin/imchk.sql.
    Both version and components are VALID.
    JServer setup is correct.
    the JServer java objects are all valid.
    ORDSYS.ORDPLUGINS is VALID.
    but the codes can still not run!!
    i don't know what's wrong.
    please help me!
    thank you!!
    Apex

  • Changing the query on a view object

    I have a view object right now, based on an entity. It is the default view object, so that means the query in the view object is straight forward, it grabs all of the attributes from the table. And there is no WHERE clause.
    In reality I only want to show a finite set of rows from my table. Every time a record is changed/edited in this entity and committed, a new row in the database is created with the same information (I'm using CreateWithParams) except for a few columns.
    I actually don't really have update on this table, just creation of new rows. But to the user, I want it to 'look' like they are editing something in the table.
    Example:
    12, 11:32,Thompson, 60 (the user edits this information in an adf table, and a new row is created in the db)
    12, 11:55, Thompson, 75
    I have a timestamp (see above) field in the database that is used as part of my primary key, so that I know which record is the latest.
    When the VO query is run, I want the user to only see the latest row from the db.
    12, 11:55, Thompson, 75
    So...
    I went to my VO, and I changed the WHERE query to add this:
    where t1.TimeStamp = (Select MAX(t2.TimeStamp) FROM rcl.x t2 where t1.uid = t2.uid);
    Now, this isn't a mysql/sql question. There's actually a better query that I'd rather run, but the VO editor doesn't allow me to change the query itself....
    When I save the new WHERE to my VO, run my page again, I get the expected result (showing me only the latest records).
    However, when I try and sort on the table in which my data is displayed, I am now getting ORDER BY errors.
    I don't want my VO to be read-only sql based. I want to be able to update my table, so I have my VO running off of the entity.
    Why doesn't the VO allow me to change the query itself? (Like do a subquery, instead of having my where clause do the work)
    Why are order by errors being thrown when I sort on my adf table after changing the where clause in my view?
    Hopefully I wasn't too convoluted in the explanation of my problem..
    Thanks in advance,
    Joel

    HI Joe,
    Regarding your problem you can do one of the following tasks:
    1- easily to tuning on your view object, I mean in the tuning page of the view you can set that only return 1 record or 2-3 record fetch not all the record.
    in the order by you will order by the timestamp field and descending.
    2- you can order by the timestamp descending and in the where clause only set the rownum<2 (will return the last record) you can also set rownum<5 and get the 4 last record etc.
    3-editing the view query in the expert mode is not advised at all because of many consequences that you will face.
    4- maybe it is not bat that you add a readonly view for the table you mentioned and every time you unpdate the entity just re-execute the read-only view.( this method maybe is good maybe is not it depends on your business logic)
    Regards.
    Edited by: Amir Khanof on Sep 3, 2010 11:11 PM

  • How to populate a table with ORDSYS.ORDImage item by BLOB item?

    Hi, I have a table, that contain blob column and another table with ORDSYS.ORDImage column and I would like to populate ORDSYS.ORDImage item in table by BLOB item, in which I have store some images?

    You should be able to do something like (this is off the top of my head, so please excuse any compile errors...):
    define
    b blob;
    i ordsys.ordimage;
    begin
    INSERT INTO ordsysImgs VALUES (1,ORDSYS.ORDImage.init());
    select imgCol into i from ordsysImgs where ID = 1 for update;
    select blobcol into b from blobImgTable;
    i.source.localdata := b;
    i.setlocal();
    i.setproperties();
    update imgcol set imgCol = i where ID = 1;
    commit;
    end;

  • Query for recurring reports using Query Builder in Business objects

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

  • ORDSYS.ORDIMAGE to BLOB  data type in select ??

    Is posible to make a SELECT that return a BLOB field from a ORDIMAGE field..??
    Example: I have the table XXX :
    CREATE TABLE XXX(
    image ORDSYS.ORDIMAGE
    Now.. I need return the "image" field but like a BLOB field..
    It's possible ... ??

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:56973810055298

  • Forms 6i and ordsys.ordimage

    i tried to build a form from a table containing an ordsys.ordimage. at first, it looked like it was happening, the forms builder knew all about the little parts of ordsys.ordimage, but when I ran the form, it acted like there were no records (which there are). i tried to build a form displaying only the "normal" fields but it didn't work either. any suggestions?
    thanks in advance - burt

    nevermind -
    it works great! i just forgot to commit the whole mess in the sqlplus/plsql session. once i did, everything displayed on the form perfectly. it's really neat.

  • OrdSys.OrdImage

    Hi Guys
    Have a bit of a problem here
    I have a ordsys.ordimage columns in my DB
    i use a adf:render on the column
    to display it on the jsp
    now the problem is i have there images that will display on the jsp ... it displays the images but what it does is display the first pic three times.....
    here is a section from the view source on the page
    <IMG SRC="ordDeliverMedia?appModID=FeatPropModuleDataControl&viewObjectName=FeatPropModule.FeatEstView&contentCol=FeaturePic&rowKey=000000000001000000FED41C6F1E&cache=1094297776000" ALT="FeaturePic" HEIGHT="166" WIDTH="250">
    <IMG SRC="ordDeliverMedia?appModID=FeatPropModuleDataControl&viewObjectName=FeatPropModule.FeatEstView&contentCol=FeaturePic&rowKey=000000000002000000FED41C6F1E&cache=1094479865000" ALT="FeaturePic" HEIGHT="166" WIDTH="250">
    <IMG SRC="ordDeliverMedia?appModID=FeatPropModuleDataControl&viewObjectName=FeatPropModule.FeatEstView&contentCol=FeaturePic&rowKey=000000000003000000FED41C6F1E&cache=1094479936000" ALT="FeaturePic" HEIGHT="166" WIDTH="242">
    So i does get the diff RowKeyStr
    here is the JSP before display
    <c:forEach var="Row" items="${bindings.FeatEstView.rangeSet}">
    <tr>
    <td> 
    </td>
    <td>
    <c:out value="${Row['EstId']}"/> 
    </td>
    <td>
    <c:out value="${Row['PropCode']}"/> 
    </td>
    <td>
    <adf:render model="Row.FeaturePic" />
    </td>
    </tr>
    </c:forEach>
    Please if anyone can help me.
    Thanks

    I cobbled together a little app that lets me upload a
    text file and an image icon to a single database
    table. I posted the (not commented, but no custom
    code was required to build it!) quick-and-dirty
    sample here:
    http://otn.oracle.com/products/jdev/tips/muench/upload
    text/UploadTextFile.zipHi,
    Any example on how to use this stuff in one ADF Rich Faces .jspx page ?
    I do not want to write my own "image-serving-servlet" in order to show image in the af:image - OrdImageDomain is exactly what I need, but don't know how to use this in one ADF Faces page...

Maybe you are looking for

  • Windows 8.1 on Ideapad U330 - sleep problems etc

    Hi Yesterday, I updated to win 8.1.  The process appeared to go smoothly, but I now have a number of issues: 1  If I close the lid and reopen, the sytem does not wake up.   It does not wake up if I press the power button.  All I can do is a hard shut

  • PORTAL integration with BI both based NW7.3

    Hello, Anybody knows there is a template wizard for BI setup coniguration in PORTAL NW7.3 (similiar to template wizard in NW7.x)?? Bet Regards, Michal Sarna

  • HT201205 iPhone 5 is stuck in searching mode. Will not recognize bluetooth device.

    How do I get my iPhone 5 to recognize my Jabar bluetooth? It just gets stuck in searching mode.

  • Application iPhoto 2.0.1

    Hi ALL, I have to Mac's ... on my iMac I see iPhoto 2.0.1 an I can't find the application on my iBook. Both Mac's running the same OSX version Tiger. Any idea ... ? Can I download it same where ?? Dimaxum

  • PNP input to PCIe 6612

    What is the easiest way to connect a PNP (current sinking) encoder to a counter-timer?  I need to trigger some electronics using a PNP encoder, and it appears the 6612 counter-timer only accepts NPN (line driver) inputs.  Is there an easy way to do t