How to display an image, which is stored in a database?

Hi All,
I would like to display an image with Web Dynpro.
I already know how to display an image which is stored in the path src/mimes/Components/...
But does anybody knows, how to display an image which is stored in a database (e.g. MaxDB)as a datatype of binary?
Thanks in advance!
Regards,
Silvia

Hallo John,
yes, you can use the Image UI element.
Further you have to create a String for the URL. Implement like as follows:
IWDCachedWebResource cachedResource = null;
String imgUrl = null;
WDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute(IPrivateXYView.IXYElement.PIC_DB);
IWDModifiableBinaryType binaryType =
               (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
binaryType.setMimeType(WDWebResourceType.JPG_IMAGE);//Example *.jpg
WDWebResourceType type = binaryType.getMimeType();
byte[] file = wdContext.currentXYElement().getPicDB();
if (file != null)
cachedResource = WDWebResource.getWebResource(file, type);
try
imgUrl = cachedResource.getURL();
catch (WDURLException e)
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                    msgMgr.reportException(e.getLocalizedMessage(), true);
I hope it will help you.
Regards,
Silvia

Similar Messages

  • How to display an image, which is stored in R3?

    Hi everyone,
    I need to display a image in a Web Dynpro application, this image is stored in SAP R3. Is there a FM to do that?
    Regards
    Eduardo Campos

    Hi Eduardo,
    if your image is in the system, there are the different syntax notations to retrieve it, as stated in the documentation link.
    To upload or download an image into an SAP system, just go to the MIME repository in the ABAP workbench, select an appropriate folder and do it. See http://help.sap.com/saphelp_nw2004s/helpdata/en/46/bb182fab4811d4968100a0c94260a5/frameset.htm and the sections on importing mimes and uploading and downloading mimes.
    Regards, Heidi

  • How to display an Image which is on Panel behind JScrollPane - Please Help

    Hiii All,
    How to display an Image which is on Panel behind JScrollPane. I have set the setOpaque() method of JScrollPane to false still when i run the program the JScrollPane is set as Opaque.. Can some one please help me in this...
    Thanks,
    Piush

    you need to set both
    scrollPane.setOpaque(false);
    scrollPane.getViewport().setOpaque(false);

  • How to display the image which in KM folder using url iview

    Hi Friends
    How to display the image, which is under KM folder structur using the url iview.
    i trying using url iview url as  \document\testfolder\abc.jpg as url for the iview.
    but its now working .. so please help me how to slove this problem
    If is not the correct way then please suggest me best way to achive this.
    Thanks
    Mukesh

    Hi Mukesh,
    I think this may work,
    1, Create a HTML Layout.
        You can put your image wherever  u want with HTML Codes.
        Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
        With this, u can use the standard KM commands also.
    2, U need to use KM Navigation iView for this rather than KM Doc iView.
    3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
    Regards
    BP

  • How can we get the image which is stored in clipboard by labview, is there any functions available like text from clip board

    How can we get the image which is stored in clipboard by labview, i can get the text in clipboard by using invoke node directly.but i cannot get the image, is there any functions or vi available.(image is in Png format)

    The Read from Clipboard method is, unfortunately, limited to text. If the clipboard contains an image then you need to use OS-specific functions calls. This is an example program for Windows. It's old, but it should still work.

  • [Forum FAQ] How to display an image from Http response in Reporting Services?

    Question:
    There is a kind of scenario that users want to display an image which is from URL. In Reporting Services, if the URL points to an image file, we can directly display it by typing the URL in embedded image. However, some URLs are just sending Http requests
    to server side, then redirect to another position and the server will return the image. For these kind of URLs, Reporting Services can’t directly render the image from Http response.
    Answer:
    To achieve this goal, we can add custom code into the report. Pass the URL as argument into our custom function so that we can create HttpRequest and get the HttpResponse. Then we can use custom function to return the Bytes() from the HttpResponse and render
    it into an image in report.
    Ps: In Reporting Services, it only support drawing Bytes() array into image, so we need to have our custom function return Bytes array.
    Add the assembly and custom code into the report.
    Public shared Function GetImageFromByte(Byval URL as String) As byte() 
                    Dim photo as System.Drawing.Image 
             Dim Request As System.Net.HttpWebRequest 
           Dim Response As System.Net.HttpWebResponse 
                  Request = System.Net.WebRequest.Create(URL)         
                     Response = CType(Request.GetResponse, System.Net.WebResponse) 
                 If Request.HaveResponse Then  
                      If Response.StatusCode = Net.HttpStatusCode.OK Then                    
                           photo = System.Drawing.Image.FromStream(Response.GetResponseStream) 
                     End If 
                 End If 
                  Dim ms AS System.IO.MemoryStream = new System.IO.MemoryStream() 
                 photo.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) 
                    Dim imagedata as byte()  
                    imagedata = ms.GetBuffer()  
                    return imagedata
    End Function
    Grant the permission for assemblies. 
    Go to: 
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSpreviewPolicy.config 
    C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\rssrvpolicy.config
    Give “FullTrust” for Report_Expressions_Default_Permissions.
    Insert an image into report. 
    Expression:
    =Code.GetImageFromByte("https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSrVwPoAtlcA2A3KaiAJi-XjS4icr1QUnKYr7uzpX3IL3g2GPisAQ")
    The Result looks below:
    Applies to:
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

  • How to display an image??

    Hello to all,
    I'm not a newbie on Forms development, but... I don't remember how to do the following! :
    - I have a form (.fmb and .fmx in d:\app\) with only one datablock and 2 text items and two buttons inside that datablock. I want to display an image which is in d:\app\ too.
    I created an image item on the form and Forms places automatically in the block. I go to thr properties page and.. I don't see where to put the path (d:\app)
    Apart from this.. Why the Forms put the image item insede the block.. ? I remember other forms I've done where the image item was inside the Canvas tree...
    Could you help me please? I suppose it's a very easy question...
    but... :( my poor memory.... is not working today
    Thanks a lot.
    Jose.

    Hi jose,
    I am also not new to Oracle forms but i am new to use image on the canvas
    the one u said file--> import is not found on my application bulder
    mine app builder is 10g forms
    please let me know the detailed process how to manage with pictures
    first of all how to paste a image on the canvas
    i dont want any thing related database
    its just a picture on the database
    thank U jose

  • How to display large image using JAI

    dear all,
    could anyone tell me how do i display an image which is around
    5000x5000 pixels in JAI. I try to use BufferImage to store the image
    but JVM throws" out of memory " error while program is running.
    thanx a lot!

    just a rough estimate, but a 5000x5000 image would require at least 24MB assuming each byte is one pixal, I believe they are 4 bytes per pixel in RBGA format. (5000*5000) = 25,000,000 pixals /1024/1024 = 23.8MB for 1 byte pixals, *4 for 4 byte = 95.3MB. I'm pretty sure that this is how it stores it. Maybe I'm wrong but it certainly explains the situation. assuming you have at least 256MB ramm, run java with -Xmx200M and see what happens.
    java -Xmx200M app
    or if you have more ramm, like 512, use 450 or 500.

  • How to display large image in JAI

    dear all,
    could anyone tell me how do i display an image which is around
    5000x5000 pixels in JAI. I try to use BufferImage to store the image
    but JVM throws" out of memory " error while program is running.
    thanx a lot!

    Hi,
    do you want to work with the image or do you only want to show it into a container?
    you can increment the JVM Memory available space. Or you can split the image into smaller BufferedImage, draw it and call the gc...

  • How to display a image in webdynpro view using a bytearry

    Hi Frndz..
    How to display an image in a view using webdynpro java ..i have bytearry object in context ..like
    *byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_
    by using this i need to show image in view..
    Kindly help me ....
    Thankas in Advance
    Regards
    Rajesh

    Hi,
    byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
    use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-
    IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
    IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();
           imageEle .setVa_Name(res.toString());
    wdContext.nodeVn_ImageTab().addElement(imageEle);
    Hope this may help you.
    Deepak

  • How to display the PK which is it alreday database sequence in a text field

    hi alllllllllllllll how to display the PK which is it alreday database sequence in a text field in form instance???

    2 ways,
    1) select the item in your SQL query and call it item_display - then you can treat it as a normal item with no impact on the database.
    2) Set the item to a display only item.
    Hope this helps,
    Russell

  • How to Display an Image on my FORM

    Good Day!
    I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
    I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
    At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
    http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
    However, instead of showing the image on a region, below is the one showing on my Form:
    <img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
    As you can see the parameter values are the same but I know I missed something that's why I'm here :)
    I would highly appreciate all the help you can provide and many thanks in advance.
    I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
    Below are the scripts.
    declare
    cursor cur is
    select *
    from wsemployee
    where empid = :P230_EMPID;
    begin
    for rec in cur
    loop
    IF rec.mime_type is not null or rec.mime_type != '' THEN
    htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
    else
    htp.p( 'No Image ');
    END IF;
    htp.p( ' ');
    end loop;
    end;
    PROCEDURE
    create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
    INTO l_mime,lob_loc,l_file_name,l_length
    FROM wsemployee
    WHERE empid = p_image_id;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || l_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    END my_image_display;
    Edited by: user13831927 on Dec 22, 2012 3:24 PM

    Hi Ying,
    you can add a UDF to the table spp2 with a programm
    but the table is not yet listed in the 'Manage User Fields' form.
    there's no way to "enable" it - sorry

  • How to display the Image in PDF report by using iText Report

    Hi
    Im trying to display the image which is very big one.
    This is my code
    Document document=new Document();
    PdfWriter.getInstance(document,new FileOutputStream("imagePDF.pdf"));
    document.open();
    Image image = Image.getInstance ("1.bmp");
    document.add(new Paragraph("Images in PDF"));
    document.add(image);
    document.close();
    But the image "1.bmp" is displayed partially. Its not spanning to the next page.
    Can anyone help me to solve this one?
    Thanks in Advance
    dhilip

    Do you actually want the image to span multiple pages? I am not sure that will be possible without splitting the image; the itext mailing list would be the place to ask.
    You could make the the page size big enough for the image using Document.setPageSize()

  • How to display an image in an alv grid in each corresponding row?

    Hi,
    please tell me how to  display an image in an alv grid in each corresponding row, like;;
    tony            23   newyork      <image>
    Mkitharyan  63   washington  <image>
    NOT BY HOTSPOTS/URL.

    you can put image in each cell you want:
    data lo_cmp_usage type ref to if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if lo_cmp_usage->has_active_component( ) is initial.
        lo_cmp_usage->create_component( ).
      endif.
      DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv( ).
        DATA lo_value TYPE ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(    ).
    data col type ref to  CL_SALV_WD_COLUMN.
    col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).
    data image type ref to cl_salv_wd_uie_image.
    CREATE OBJECT image.
    image->SET_SOURCE_FIELDNAME( 'IMAGE' ).
    COL->SET_CELL_EDITOR( image  ).

  • How to display a view which contain interactive form in an external window

    Anyone know how to display a view which contain interactive form in an external window?
    I managed to display the view in an internal window with the following code:
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PdfReportWin");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
    For external window, I tried this method : wdComponentAPI.getWindowManager().createExternalWindow(String URL, String title, boolean modal) but there are no parameter for view name?
    Maybe this is not the correct way, really appreaciate if anyone can help.

    Hi,
                U need to the following
               1.Create another window
               2.Create a view in it tat contains Interacive form element.
               3. call this window dynamically thru the first window by creating a context element of IWDWindow  type
    The code may help:
      IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("SearchEmpwind");
          IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);
          window.setWindowPosition(WDWindowPos.CENTER);
          window.setWindowSize(400, 250);
          window.open();
          wdContext.currentContextElement().setEmpSearchWind(window);
    Regards
    Ishita

Maybe you are looking for

  • Screes Resolution 800*600 and 1024*768

    hi all i need trigger to solve Screes Resolution in run fmx ! if developed the program under 800*600 res. ok run but when change the resolution some of items can't display> [email protected] bye

  • Posting entry in one depreciation area

    Hi I am capitalizing one expense in company's act depreciation area (i.e. book depreciation area) and capitalizing it in another depreciation area (say IFRS depreciation area) How to do this in SAP Because i need to create asset master in one depreci

  • Troubelshoot help on mic recording please

    HI all, thanks for looking in. I have lost my ability to record VO..It was wroking fine last time I used it. Went to use it again and nothing? Win7Pro OS SvcPk1 AU updated RealTek Driver Followed this http://forums.adobe.com/message/4256315#4256315 H

  • Applescript/Pages and adjusting column width (and paragraph style)

    I was hoping that some someone might know how to adjust the width of individual columns in Pages using Applescript. It seems like it should be a simple task, and I can adjust the overall width/height of the table, but I haven't found a way to adjust

  • Would you allow a user to install Oracle?

    I have a user who has a "Course Technology Kit for Oracle 9i Software" that she would like installed on her PC (she's taking a class in this). This kit is supposed to be for training, but it appears to me to be a full-blown version (although "Persona