ORDSYS.ORDImage.processCopy

Hello,
i have problem - when i create thumbnail from bigger picture (biger as 5 Mpixel) then application create record with length "0" (blob)
ORDSYS.ORDImage.processCopy(src_blob,'maxscale=180 130', dst_blob);
update iacs_lob.lo_thumb set thumb_data=dst_blob where id =iid;
end;
can you help me? thanks

Just to update it seems that the problem is that colour range is not being normalized properly. For example, if use the linux command
convert -normalize input.tif output.jpg
This will produce a decent looking image. Are there any auto normaliztion function in the process() function?

Similar Messages

  • How does ORDImage.processCopy() works ?

    Hi,
    I'm using Oracle 10g r2.
    I need to show ORDImages (and BLOBs).
    Here is my procedure that shows thumbnails :
    create or replace procedure show_photo_thumbnail(v_id_photo in number, v_height in number, v_width in number) as
         obj ordsys.ordimage;
         obj2 ordsys.ordimage;
    begin
         --obj2 := ordsys.ordimage.init();
         select phot_source into obj from photos where phot_id = v_id_photo;
         select phot_source into obj2 from photos where phot_id = v_id_photo for update;
         obj.processcopy('maxscale= '||v_width||' '||v_height, obj2);
         owa_util.mime_header(nvl(obj2.getmimetype(),'application/octet'), false );
         htp.p('content-length: ' || obj2.getcontentlength());
         htp.p('content-disposition: filename="' || obj2.source.srcname || '"');
         owa_util.http_header_close;
         wpg_docload.download_file(obj2.source.localdata);
         commit;
    end;It works, but if I call this function repeatedly (from our apex application), the image quality becomes less and less good, it seems it processes always the same image.
    And for example if I call show_photo_thumbnail(1126, 150, 150) and then show_photo_thumbnail(1126, 500, 500), it seems the 500 x 500 image is processed from the 150 x 150 thumbnail so the quality is very poor.
    I read the entire documentation and I really don't understand why.
    By calling this other procedure we can see that the content stored stay unchanged :
    procedure show_photo_infos(v_id_photo in number, v_height in number, v_width in number) as
         obj ordsys.ordimage;
         obj2 ordsys.ordimage;
    begin
         select phot_source into obj from photos where phot_id = v_id_photo;
         select phot_source into obj2 from photos where phot_id = v_id_photo for update;
         obj.processcopy('maxscale= '||v_width||' '||v_height, obj2);
         dbms_output.put_line('obj  : '||obj.getmimetype()||', '||obj.getcontentlength()||' bytes, '||obj.getwidth()||' x '||obj.getheight());
         dbms_output.put_line('obj2 : '||obj2.getmimetype()||', '||obj2.getcontentlength()||' bytes, '||obj2.getwidth()||' x '||obj2.getHeight());
    end;
    show_photo_infos(1126, 200, 200);
    obj  : image/jpeg, 79754 bytes, 572 x 504
    obj2 : image/jpeg, 4635 bytes, 200 x 176Any help would be much appreciated.
    Thanks.
    Yann.

    I was looking for a solution for this: I have a good quality (heavy) image stored in a BLOB. And i need a small, light version (a thumbnail) of that image for fast web page display. I have a table (pics) with the original BLOB picture (foto) and the BLOB column for the thumbnail (thumb) initialized as empty_blob(). This is the code that worked fine for me:
    DECLARE
         big_image blob;
         small_image blob;
         idm number;
    BEGIN
         idm:=10469; -- my id
         big_image :=EMPTY_BLOB();
         small_image :=EMPTY_BLOB();
         SELECT foto,thumb INTO big_image ,small_image FROM pics
         WHERE idpic = idm for update;
         ORDSYS.ORDImage.processCopy(big_image,'maxscale=64 64', small_image);
         UPDATE pics SET thumb = small_image
         WHERE idpic = idm;
         COMMIT;
    EXCEPTION
    WHEN ORDSYS.ORDImageExceptions.DATA_NOT_LOCAL THEN
    DBMS_OUTPUT.PUT_LINE('Data is not local');
    END;

  • 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

  • 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.

  • 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;

  • 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

  • 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 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?

  • 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...

  • 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!

  • How can i  view an image (ORDSYS.ORDImage) present in db

    hi
    how can i view an image (ORDSYS.ORDImage) present in db through sql developer?
    regards
    manoj

    Manoj,
    I put a request in to the SQL Developer exchange to do this natively and it has been accepted. In the meantime you can use the following SQL...
    select ordsys.ordimage.getcontent('column') from 'table'
    The resulting image can then be viewed in the results tab if it is a type that SQL Developer recognizes such as a JPEG.
    Cheers
    Alex

  • ORDSYS.ORDimage and BLOB convertion

    Hi every one,
    I have a ORDSYS.ORDimage in a table (under Oracle 9i) that I need to show in a Forms 6i Image item (wich is finally a BLOB I guess).
    Is there anyone that could tell me how to convert ORDSYS.ORDimage into a BLOB. I found in the interMedia documentation examples on how to save a BLOB into a ORDSYS.ORDimage with the filename of the image but I found nothing on converting ORDSYS.ORDimage into BLOB and vice versa.
    Thank everyone for your help.
    Marc

    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?

  • Search for a color in ordsys.ordimage

    Hi,
    Is it posible to make a search for a specific color in a column ordsys.ordimage. For example i ask i want all the pictures that contains RGB(255,0,0),
    Thanks.

    Hi,
    This is one of the features we are considering for the next release.
    Would you be able to share with us the specifics of the application -
    the domain, what kind queries does the application have ? Do you only look for
    colors or do you also look for specific shapes? Any information will be
    really useful to us in preparing the functionality for this feature.
    Also we would like to get a feeling for the range of applications that
    would find this feature useful.
    I look forward to hearing from you.
    Melli

  • Limitations with interMedia with ORDSYS.ORDImage.process()?

    Hello,
    We are currently writing an Apex application that will allow our users to upload pictures to the database. We have been using interMedia to manipulate them as we want to create thumbnails etc. We have one picture that just won't scale down at all. We are using blobs to store the images on the database. We are using the command:
    ORDSYS.ORDImage.process(l_thumb, 'maxscale=160 160');
    and as I say most of the images are scaling but some are not. The image details is by using ORDSYS.ORDImage.getProperties:
    MIME Type: image/jpeg
    Width: 3292
    Height: 3279
    File Format: JFIF
    Content Format: 24BITRGB
    Compression Format: JPEG
    Content Length/Size: 3634347 (bytes)
    As I say when I try and do the process command it makes no difference as the thumbnail properties are the same as the original properties.
    If so is there anyway around this?
    Thanks,
    Paul.

    Hi there.
    We are trying to do this in PL/SQL and was wondering if it did write anything to a exception table?
    Here is the code that we use:
    declare
    l_page blob;
    l_web blob;
    l_thumb blob;
    L_TEMP_BLOB BLOB;
    TEMP_ID INTEGER;
    AMOUNT INTEGER;
    l_mime VARCHAR2(250);
    begin
    IF (:P2_FILE_NAME is not null)
    THEN
    SELECT blob_content a, mime_type
    INTO L_TEMP_BLOB, l_mime
    FROM HTMLDB_APPLICATION_FILES
    WHERE NAME = :P2_FILE_NAME;
    INSERT INTO PL_IMG_DATA(img_data_id, title, location, img_date, grid_ref, orig_img_loc, description, staff_number,unit_id, mime_type, file_name)
    VALUES (PL_IMG_DATA_SEQ.nextval, :P2_TITLE, :P2_LOCATION, :P2_DATE, upper(:P2_GRID_REF), :P2_ORIGINAL_LOCATION, :P2_DESCRIPTION, :P2_STAFF_NUMBER, :P2_MAN_UNIT, l_mime, :P2_FILE_NAME)
    RETURN img_data_id into TEMP_ID;
    COMMIT;
    UPDATE PL_IMG_DATA SET THUMBNAIL = EMPTY_BLOB(), WEB_IMG = EMPTY_BLOB(), PAGE_IMG = EMPTY_BLOB()
    WHERE IMG_DATA_ID = TEMP_ID;
    COMMIT;
    SELECT THUMBNAIL, WEB_IMG, PAGE_IMG
    INTO l_thumb, l_web, l_page
    FROM PL_IMG_DATA
    WHERE IMG_DATA_ID = TEMP_ID
    FOR UPDATE;
    amount := dbms_lob.getlength(L_TEMP_BLOB);
    DBMS_LOB.copy(l_thumb, L_TEMP_BLOB, AMOUNT, 1, 1);
    DBMS_LOB.copy(l_WEB, L_TEMP_BLOB, AMOUNT, 1, 1);
    DBMS_LOB.copy(l_PAGE, L_TEMP_BLOB, AMOUNT, 1, 1);
    ORDSYS.ORDImage.process(l_thumb, 'maxscale=160 160');
    ORDSYS.ORDImage.process(l_web, 'maxscale=320 320');
    ORDSYS.ORDImage.process(l_page, 'maxscale=640 640');
    UPDATE PL_IMG_DATA SET THUMBNAIL =L_THUMB, WEB_IMG = L_WEB, PAGE_IMG = L_PAGE
    WHERE IMG_DATA_ID = TEMP_ID;
    COMMIT;
    DELETE FROM HTMLDB_APPLICATION_FILES
    WHERE NAME = :P2_FILE_NAME;
    END IF;
    END;
    As we say it seem to work for images that are a certain size but anything that is roughly over 3,500 KB it doesn't scale it down.
    We were wondering if the this is a version problem as we are currently on Oracle 9.2.0.8.0?
    We did manage to scale it down when we used a TIFF but then the application didn't display it so we converted the scaled down image back to a jpeg. This seems a bit mad to do right enough,

Maybe you are looking for

  • Can I run two different OS on same computer?

    I have a Mac Pro Intel Tower with 3 hard drives. I am currently running OS 10.4.11 and my question is could I install OS 10.6 on a separate drive and run each at separate times? I have software that I don't want to have to buy new in order to run on

  • Unread communication showing on home page

    Hi, I am getting issue that on my home page there are showing some communication as unread but when i check there are no any pending document exist. also from some time i am not getting point for helpful answer . can anyone help me out . regards, muk

  • Tim, please help with graphs or provide documentation

    Tim, Could you please point me to examples of DTD for graphs. I've gone through the Oracle XML Publisher user guide but that just touches on graph and it doesn't cover it extensively. I'm finding that graphs within a repeating group is not handled pr

  • Quits on printing

    Most of the time Freehand quits after I execute a Print command. I am using Freehand version 11, build 416 on a PowerBookk G4, OS 10.4.10 Any thoughts? Jim

  • How do I run "Korean Classic OS 9" with OS X which was bought from America?

    I have a project I am working on which requires Korean Quark Xpress 3.3. In order to install this, I am being told I need to run Korean Classic OS 9. A Korean Mac Engineer told me this is possible, but didn't tell me exactly how. Does anyone have exp