How to get blob image width with ordimage?

Hello,
I have trouble getting image width with ordimage. I have quite the same program for processing images as here: http://spendolini.blogspot.com/2005/10/manipulating-images-with-database.html
so I have declared image files as BLOB files. How can I get the width for the them?
There is a sample from ordimage reference:
DECLARE
image ORDSYS.ORDImage;
width INTEGER;
BEGIN
SELECT p.product_photo INTO image FROM pm.online_media p
WHERE p.product_id = 3515;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;
the ORDSYS.ORDIMAGE is used instead of BLOB here. when i do the same then i can't select BLOB content into the ORDSYS.ORDIMAGE variable. And otherwise I can't use the getWidth with the BLOB variable.
Can anybody help please?

Hi,
the column blob_content is not suitable for storing into v_image2 because variable v_image2 is of type ORDSYS.ORDIMAGE and the column is BLOB.
I used the following method instead:
declare
image blob;
attributes clob;
img_mimeType varchar2(32);
img_width integer;
img_height integer;
img_contentLength integer;
fileFormat varchar2(32);
contentFormat varchar2(32);
compressionFormat varchar2(32);
begin
DBMS_LOB.CREATETEMPORARY(attributes, TRUE, DBMS_LOB.CALL);
select img
into image
from image_repository
where id = 0;
ORDSYS.ORDImage.getProperties(image,
attributes,
img_mimeType,
img_width,
img_height,
fileFormat,
compressionFormat,
contentFormat,
img_contentLength);
dbms_output.put_line(img_mimeType);
dbms_output.put_line(img_width);
dbms_output.put_line(img_height);
dbms_output.put_line(fileFormat);
dbms_output.put_line(compressionFormat);
dbms_output.put_line(contentFormat);
dbms_output.put_line(img_contentLength);
DBMS_LOB.FREETEMPORARY(attributes);
end;
try adapting this code and think about the possibility of "caching" image properties, because it takes some time to retrieve them every time.
Bye,
Flavio
http://oraclequirks.blogspot.com/search/label/Apex

Similar Messages

  • [CS2]How to get the Image Width & Height using JS (ILLUSTRATOR CS2)

    Hi,
    How to get the Image width & height of an Image using javascript .Im using Illustrator CS2.
    Any sample code
    Regards
    MyRiaz

    you can reference the dimensions of a loading image (or swf)
    by referencing the target movieclip's dimensions AFTER loading is
    complete. ie, use preloader code or the onLoadInit() method of a
    moviecliploader listener.

  • How to display BLOB image column with WEB application, JSF, ADF BC

    I looking for a way to display the content from a blob column on a WEB application, JSF, ADF BC
    The blob column contains a JPEG image.
    About the application
    The model contains a viewobject where the blob column attribute (photoimg) type is of type : BlobDomain
    Now I have to create the view to display the content of photoimg inside a JSF-JSP page.
    Any advice ?

    Search is your friend
    How to display the content of a BLOB column in a ADF/BC pages ?
    John

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • How can I get the image width and height stored in database?

    Hi!I write s servlet to display images store in database.but how can I get the image width and height?

    Have you tryed using PJA or a similar library?
    I presume you get java.lang.NoClassDefFoundError on the line :
    Toolkit.getDefaultToolkit();?

  • How to get the image stored in archieve link as an attachment in work item.

    Hi All,
    through transaction OAWD we are storing scanned images.
    Once this transaction is executed a workitem appears in the inbox of the initiator with the scanned invoice as attachment.
    When the user executes the work item FV60 screen is displayed where the user enters the data based on the scanned invoice attachment.
    After the user Parks the document the custom workflow triggers and a workitem appears in the inbox of an approver.
    Our requirement is that the scanned image should also appear as the attachment.
    Can you please suggest how to get the image stored in archieve link as an attachment in work item.
    Regards
    Shraddha

    Hi Martin,
    with every parked document a scanned image is linked.
    I need to create a link under objects and attachments in the work item, such that when the user clicks that link the image is displayed.
    At present the following functionality is available.
    The BO used is FIPP
    Objects and attachments:
    parkeddocument:AK0108500001252008.(via FIPP binding with WIOBJECT_ID)
    On clicking the link below objects and attachments: the parked document AK0108500001252008 opens in display mode.
    Now we want to have 2 links:
    parkeddocument:AK0108500001252008.
    image.
    When we click on the link image then the scanned invoice linked to the document should get opened.
    I am able to get the image id of the the image through  SAP_WAPI_GET__OBJECTS,
    export parameter leading_object provides the detail.
    But I am not able to figure out how to use it in my workflow to display it as an attachment.
    Hope this will give a better understanding of my question.
    can you please suggest as to how I should proceed with it.

  • How to get an error icon with tool tip in a displaying table   in a particu

    How to get an error icon with tool tip in a displaying table   in a particular field..
    Thanks.

    Hi,
    In the context  create an attribute of type string .
    Create the attribute in the node which you bind for table.
    In the layout .
    1.create a Table UI element.
    2 create binding for UI element.
    3Right click on the Table UI and select insert table column.
    4.once the table column is inserted right click on table column and select insert cell editor.
    5.create the cell editor of the type image.
    6.Bind the source property of the image to the attribute in the node which you have created.
    so depending on what image(type of icon) needs to be displayed set the attibute accordingly.
    refer to the link for image :
    [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/frameset.htm]
    Priya

  • Has anyone figured out how to get speech recognition working with sticky keys enabled on mountain lion?

    I'm trying to use speech recognition to input text on my iMac running the latest mountain lion, 10.8.3.
    I have sticky keys enabled.
    When I try to start speaking by pressing the function key twice nothing happens. I can only get it to work if I disable sticky keys.
    The same problem occurs with all the other modifier keys as shortcut, they do not work with sticky keys.
    When I try to select a different shortcut, I am unable to select a two key combination, but am limited to one.
    If I select the F6 key, or any other single key, I am able to start speech recognition. However the second time that I press the key, it does not stop recognition and process my words. Instead, it restarts the recognition.
    Has anyone figured out how to get speech recognition working with sticky keys enabled?
    Or a way to get an individual key shortcut to start on the first press and process it on the second?
    Or a way to get key combinations to work, as specified by the help:
    Dictation On and Off
    To use Dictation, click On.
    When you’re ready to dictate text, place the insertion point where you want the dictated text to appear and press the Fn (function) key twice. When you see the lighted microphone icon and hear a beep, the microphone is ready for you to speak your text.
    Shortcut
    By default, you press the Fn (Function) key twice to start dictation. If you like, you can choose a different shortcut from the menu.
    To create a shortcut that’s not in the list, choose Customize, and then press the keys you want to use. You can press two or more keys to create your shortcut.

    I noticed with version 10.8.4 of OS X that I am now able to select F6 to activate, and the return key to complete the speech recognition. This is still different than the description of how these should function that's included in the help, but at least it's an improvement.

  • How to get gui_download and gui_upload with popup filename?

    how to get gui_download and gui_upload with popup filename?

    Here is a short example.
    report zrich_0003 .
    data: ifiletab type filetable.
    data: xfiletab like line of ifiletab.
    data: xstring type string.
    data: rc type i.
    data: itab type table of string.
    data: xtab type string.
    start-of-selection.
      call method cl_gui_frontend_services=>file_open_dialog
        changing
          file_table              = ifiletab
          rc                      = rc.
      read table ifiletab into xfiletab index 1.
      xstring = xfiletab-filename.
      check not xstring is initial.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = xstring
      changing
        data_tab                = itab.
      loop at itab into xtab.
        write:/ xtab.
      endloop.
    Regards,
    Rich Heilman

  • How to get my images always order by file name, and not by time of captur, in all the folders in the library?

    How to get my images always order by arquive name, and not by time of captur, in all the folders in the library?
    Sorry for the poor english, but im portugues.
    In the library we can change the order of classification of image by, time of capture, name of file etc... I'm wondering if its possible define to be always by the name of file.
    It ´s possible?
    And i have other question, in print label we have an option to auto rotate to feet in page to have the image using the maximum area in the page (auto rotate, zoom etc), its possible to change the orientation of the rotation to be always in  the other direction?

    The Muvos are USB Mass Storage devices and do not have the ability to display track information based upon ID3 tags.
    The Zens all read and display track info based upon ID3 tag information that is either gathered from an online source or entered by the end-user.
    If you want the track information displayed instead of the ID3 tag information, you could edit the ID3 tags and rename the title to whatever you have as the file name. Not sure why your file names would differ so much from the ID3 tag info though, almost all of my content has the same name for the filename as it does on the ID3 tag title.

  • How to get the contents associated with a component.

    How to get the contents associated with a component.
    Like i have 2 buttons and i want to get the contents associated with these button without clicking them i.e without firing the event.
    By Contents i mean, whatever things we get after firing the event,we get some other window and some thing is added to the current page and so on.

    grab all the code inside the actionPerformed(ActionEvent e) method

  • How to get a minus sign with the cost  field in ALV.

    Hi ,
    How to get a minus sign with the cost field in ALV.
    The Ouput will be displayed like  Rs -1500 instead of 1500-
    I can't use concatenate also as i may have to use the sum functionality of ALV .
    Cheers
    Sunny

    Hi sunny,
    1. The OTHER FIELD
       has to be character field of say length 15.
    2. Write the original numeric value to
       this character field (in a loop)
    3. But simply writing won't help.
    4. use this kind of logic.
    5.
    REPORT abc.
    DATA : m TYPE i.
    DATA : chr(15) TYPE c.
    m = -100.
    WRITE m TO chr.
    IF m < 0.
      SHIFT chr RIGHT BY 1 PLACES.
      CONDENSE chr.
      CONCATENATE '-' chr INTO chr.
    ENDIF.
    WRITE chr.
    regards,
    amit m.

  • How can I download images taken with my iPad onto my MBP please?

    How can I download images taken with my iPad onto my MBP please?

    Your other option if you have icloud and a mac is to use iCloud and sync them across through photo stream. The other option as jhappahc said is to use a usb and import the photos through iPhoto.

  • How to get vlan tag programe with mac book air

    how to get vlan tag programe with mac book air,i'm using the usb ethernet adapter

    For prompt help contact TATA.
    For more on this: https://discussions.apple.com/thread/3680625?tstart=270

  • Hi I have opened my trial of photoshop,but cant figure out how to get an image from my pictures in t

    I have opened my trial of photoshop,but cant figure out how to get an image in.

    Hi,
    The first video on https://helpx.adobe.com/creative-cloud/learn/start/photoshop.html shows you one way to do this: If you open Photoshop, just drag the image file from Explorer/Finder into the PS workspace (or even just to the PS icon).
    Another way is to open Photoshop, select File > Open from the menu, and navigate to your image.
    Hope this helps,
    Randy Nielsen
    Learning Content Manager, Creative Cloud Learn
    Adobe

Maybe you are looking for

  • Keep receiving error when trying to use a new Apple ID

    "Please sign in again. For added security, we need to reconfirm your Apple ID." I am beyond frustrated and have been working on this for about 2 hours. I don't understand how something so simple is becoming such a nusance. I created a new Apple ID ho

  • Can I share itunes libtary with other devices under a different account

    How can I share itunes library (books) on another device that is in the same family , but a different account

  • Ad Hoc Querry

    hi all, i was using ad hoc querry for generating some reports. but now some error is coming, and ad hoc querry is not working fine. how 2 make changes in ad hoc query, i m nt able 2 generate education and previous employee details correctly. kindly h

  • How do I get rid of a bar at the bottom of my screen in FireFox?

    I'm using FireFox 8.0 in Windows XP with all service packs. The website: www.washingtonpost.com, in it's major news stories, such as: http://www.washingtonpost.com/politics/mitt-romney-under-attack-in-final-nh-debate/2012/01/08/gIQAAOfHjP_story.html?

  • Master Data Distribution !

    Hi!    I want to know the purpose of master data distribution for the following between the vendor & the customer.    1. Material Master    2. Vendor Master & Customer Master.   Whats the purpose of linking our system with our vendor or customer etc