Display Image from Local p"ath c:\image.gif"

Hi Experts,
Is there anyway to display an image from local path i.e "c:\img.jpg".
I need to display an image from the path in Dialog(Screen) programming.
I need to do it using program not any other way...
Can anyone suggest me a method please.
Thanks
Regards
Naveen

Well you could use the HTML control - try program SAPHTML_DEMO1 and key in the c:\img.jpg to check it works for you... or the picture control as used in example SAP_PICTURE_DEMO.
Jonathan

Similar Messages

  • Display Image from Local path "c:\image.gif"

    Hi Experts,
    Is there anyway to display an image from local path i.e "c:\img.jpg".
    I need to display an image from the path in Dialog(Screen) programming.
    I need to do it using program not any other way...
    Can anyone suggest me a method please.
    Thanks
    Regards
    Naveen

    Hi Naveen,
    You'll have to create a custom control for this and perform coding like this:
    data piccon type ref to cl_gui_custom_container.
    data my_piccon type ref to cl_gui_container.
    data my_pic type ref to cl_gui_picture.
    data my_container type ref to cl_gui_container.
    * invoking the static attribute of the class.
    my_container = cl_gui_container=>default_screen.
    create object piccon
    exporting
    parent = my_piccon
    container_name = 'IMG_CON'
    * STYLE =
    * LIFETIME = lifetime_default
    repid = sy-repid
    dynnr = sy-dynnr
    * NO_AUTODEF_PROGID_DYNNR =
    exceptions
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    create object my_pic
    exporting
    * LIFETIME =
    * SHELLSTYLE =
    parent = piccon
    * NAME =
    exceptions
    error = 1
    others = 2
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    * Can be used to load the picture from the presentation server.
    call method my_pic->load_picture_from_url
    exporting
    url = 'file://D:mydataPicturesMisc_pics 1fw1.jpg'
    * IMPORTING
    * RESULT =
    exceptions
    error = 1
    others = 2
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

  • Download Image from Local PC

    Hi,
    I have a jpg image which is stored in the local system(not on the server).I have written an application from which I am not able to download the image from the local system.
    I am using the following code but this code works only if the image is present on the server.
            String file = "C:\Folder_Name\image.jpg";
            final byte[] content = this.getByteArrayFromResourcePath(file);     
         final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.UNKNOWN);
                    try
         final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getURL(), "WD_Filedownload", true);
         window.open();
         catch(Exception e)     {
         wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
             private byte[] getByteArrayFromResourcePath(String resourcePath)throws FileNotFoundException, IOException
               FileInputStream in = new FileInputStream(new File(resourcePath));
               ByteArrayOutputStream out = new ByteArrayOutputStream();
               int length;
               byte[] part = new byte[10 * 1024];
               while ((length = in.read(part)) != -1) {
                 out.write(part, 0, length);
               in.close();
               return out.toByteArray();
    And for downloading the file or image from local system I need to put the file in \src\mimes\Components folder; Where as I want the file to be downloadable anywhere from the local file system. Is that possible?
    Thanks
    Pravin

    Pravin,
    If you want to display an image existing elsewhere on the local machine, you need to upload it first (use FileUpload UI component), store it in a byte array and then continue with your code below of creating a cached web resource.
    And you place resources in src/mimes/component so that they will be available to the application (meaning for all users). This doesnt mean you are displaying the image from the local file system. When you deploy, these images go and live in the server and accessed from there.
    In any case, the hardcoded image location in your code is valid only for YOU but not necessarily other user running the same application.
    As such, you cannot access the client's file system explicitly (i.e local machine) due to security reasons. I know of no other way to do it with WebDynpro. Any resources must be present on the server side at some point of time. Either at application start or ask the user to provide it (like FileUpload).
    No web technology allows that other than signed applets or trusted activex controls, as far as i know.
    Hope that clears the confusion.
    Thanks,
    Rajit
    Message was edited by:
            Rajit Srinivas

  • View image from local

    Hi,
    I'm using J2ME wireless toolkit, and I want to know is it possible to view image from local(eg. C:\WTK22\appdb\DefaultColorPhone\filesystem\root1). I've written some code to view form the folder but it appear "error: null".
    mage storedImage = null;
              String picLink = "file://localhost/" + currDirName + fileName;
              try{
                   storedImage = Image.createImage(picLocation);
              catch(Exception e){
                   System.out.println("Error here: " + e.getMessage());
              }

    Yes, it is possible.
    They were demonstrating the RT display at NI Week. It is part of the RT features of Vision 6.1. You can route an IMAQ display window to the video output on the PXI chassis. Anything you display in that window will show up on your screen.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Get image from local file system for printing

    If a user clicks Print, I would like to be able to print the
    stationery header if the user wants to print on plain paper. Can I
    pick up the image from the users local file system and add it
    directly to the print send object? Prior to this the user would
    simply upload the location of the image to the remote server where
    the swf resides, or do I have to ask him to upload the image itself
    and then download it again every time he uses the program?
    Doug

    Here is a snippet from the Flex 2 user guide about urlloader:
    When using this method, consider the Adobe® Flash®
    Player security model:
    For Flash Player 8 and later:
    Data loading is not allowed if the calling SWF file is in the
    local-with-file-system sandbox and the target resource is from a
    network sandbox.
    Data loading is also not allowed if the calling SWF file is
    from a network sandbox and the target resource is local.
    As far as I know there is no way for a user to "trust" an swf
    file. This is not like an activeX control.

  • Resize image from local drive and upload to server

    Hi there
    I want to allow the user to chose an image from his local
    hard drive.
    The image should then be loaded into the Flex 2 application.
    There I wanna show him infos about the image e.g. height and
    width.
    He should then be able to scale/resize the image and upload
    it to the server.
    I have no idea how to do that :-)
    Any thoughts on that?
    Thanks in advance
    Bernd

    Well in short, you need a second language to support that,
    e.g. PHP/ASP/CF.
    First you'll have to build a GUi in which you can upload the
    jpg, putting it to the server using php/asp/cf, then you'll need to
    make a call to that image, (importing it into your flex), then
    you'll have to set the parameters for the resizing, then you'll
    have to call a php/asp/cf script which does te resizing

  • How to load an image from local filesystem, and paint it to a frame

    Please offer an AWT solution

    Image getImage
        String path
        Image image = Toolkit.createImage(path);
        loadImage(image);
        return image;
    void loadImage
        MediaTracker mt = new MediaTracker(image_observer);
        mt.addImage(image, 0);
        try
            mt.waitForID(0);
        catch interrupted exception
    class extends Panel
        Image image
        public void paint(
            g.drawImage(image,
        public void update(
            paint(g);
        public Dimension getPreferedSize
            return size of image

  • Generating full-size image from thumbnail using BLOB DB images

    Hi all,
    Assuming that all necessary steps were taken in other posts and tutorials to display images on a web page from BLOB objects stored in an Oracle 10g DB, how is it possible to set the size of the created images (from the servlet that creates the image file from BLOB) so that it is smaller than the actual image in the DB. the user would then have to click the image to open the full image.
    would this be done by possibly creating 2 servlets, one that displays a smaller version, and one that displays the actual image?
    i don't see how this can be done since the url property of each image is bound to the url of the servlet. If the thumbnail has a url pointing to image produced by thumbnail servlet, would i assign an action handler for clicking the image that redirects to a url given by the full size image servlet? or should i use an image hyperlink instead?
    any help is always appreciated!

    Suggest you take this one step at a time.
    1. Create a database and store your images in it. (Or write the upload mechanism if you need it).
    2. Display your full size images.
    3. Display your full size images as thumbnail size. (Performance will not be good but you'll have results.) Creator allows you to set image size independantly of the size of the underlying image.
    4. Modify the servlet you wrote in step three to optionally reduce the resolution (or quality) based on an input parameter.
    References: Steps 1 -3
    http://blogs.sun.com/sakthi/entry/how_to_upload_and_retrieve
    Step 4
    http://java.sun.com/developer/onlineTraining/javaai/jai/RenderableScaleFrame.html
    Or possibly some other library.

  • Drag and drop images from the OS or select images over filebrowser

    Hello,
    I want to create an image upload tool in JavaFX with similar functionality like Jumploader (http://jumploader.com/). The users should be able to select images from the filesystem that will be resized and uploaded to their website, similar as in Facebook. The difference is that I want users to be able to crop images directly in my application. This is something, other upload tools do not offer.
    I was searching weeks on the web trying to find a sample on how to drag and drop images in to a JavaFX 1.3.1 app or also to create a file browser. I have found many examples but they seem to be outdated. Is it to early yet to try and start projects like these with JavaFX as JavaFX is still under development? Or can anybody lead me in to the right direction?
    Thanks,
    Chris

    To be more precise, you can setup a JComponent or JPanel on top of your JavaFX nodes that has a TransferHandler that can convert the (AWT/Swing) images dragged to the app to JavaFX image and then insert it into the underlying node.
    As for the file chooser itselft: ListView and the JavaFX composer can allow you to create one quite easily. TreeView can aslso be used to a lesser extend (still a big buggy). For both of these, there are small bugs in the Cell API that may (or may not) prevent from displaying a proper thumbnail in the cells.
    You can also use a regular JFileChooser if you do not mind the dialog box having a different LnF from the rest of your application.

  • Making 3channel 32 bit images from 1 channel 8 bit images ( channel combining)

    Hi guys
    Although I have a simple problem, i could not solve it yet.
    I am tring to combine opencv and labview by using .dll.I succesfully process and read  8bit images from opencv to display on labview as a 8bit images.
    My problem encounters here. When i try to process 3 different 8bit images in opencv and display them as a single 3 channel RGB image, labview can not read image properly.
    I also think that can I combine these 3 different 8bit images in labview not in opencv? is there any .vi that can merge 3 8bit images and produces single 32bit RGB image?
    Thanks
    Baris Togrul
    I am sending my .vi,my dll. and my opencv function.it may give a idea. 
    IBO2_API int Convolution_OpenCV_NI (char* LVImagePtrSrc, int LVLineWidthSrc,
    char* LVImagePtrDst, int LVLineWidthDst,
    int LVWidth, int LVHeight)
    IplImage *CVImageSrc, *CVImageDst;
    //Create OpenCV headers and set pointers/geometry from LabVIEW:
    CVImagesrc=cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
    CVImageSrc->imageData = LVImagePtrSrc;
    CVImageSrc->widthStep = LVLineWidthSrc;
    CVImageDst = cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
    CVImageDst->imageData = LVImagePtrDst;
    CVImageDst->widthStep = LVLineWidthDst;
    //Create convolution kernel:
    cvSmooth(CVImageSrc,CVImageDst,CV_BLUR,3,3,0,0);
    return 0;
     by the way I am using opencv 2.1
    Attachments:
    opencv-labview.zip ‏22 KB

    Is this what you want? I saved it to LV2010.
    It lets you initialize the three planes to different colors and then merges them into a color RGB image.
    Attachments:
    IMAQ RGB planes to RGB image.vi ‏45 KB

  • Grabing images from & Apply OCR To that image

    Hi,
    I m developing a sample application on OCR. At last visit i m posting the same question.But no one can answer me.
    Here i Create a Vi for grabbing images from camera. The Images are grab & save to the desired folder.But the OCR is not working on that snap image.
    I m  modified some Sample NI VI's for capturing the images & for OCR.
    I m new for labview. I cant understand where is the problem in the VI.
    i also create a character set file for reading the characters using OCR Training.
    so please help me to find the solution.
    Attachments:
    Character reading.vi ‏91 KB

    HI.
    Let me give some suggestions regarding your code, (See pictures), and attached an example that you could serve.
    Regards.
    Jonathan Cruz
    CHALLENGER
    K U D O S __ B I E N V E N I D O S
    Attachments:
    Camara OCR.vi ‏42 KB
    11.JPG ‏77 KB
    22.JPG ‏17 KB

  • Is it possible to create an image from part of a png image???

    i have an image and i want to create 4 indivdual image from it in which they could be combined to reform the image that i have

    Its actually quite easy, first you create a new blank image the size of the section you need, then you draw the larger image onto the new image so that the section you want starts at the top left corner of the new image. I use the code below, which works fine.
    Image image = Image.createImage("/myimage.png");
    int width = [whatever the width of the new image is];
    int height = [whatever the height of the new image is];
    int x = [x position of where your image section starts];
    int y = [y position of where your image section starts];
    //Creates a new Blank Image where we will draw our
    //section on to
    Image imageSection = Image.createImage(width, height);
    Graphics g = imageSection.getGraphics();
    //set the clip
    g.setClip(0,0, width, height);
    //Draws our larger image onto our new image
    g.drawImage(image, -x, -y, g.TOP|g.LEFT);

  • I need to download image from the url and the image is in byte format.

    hi
    i need to download image from the url
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    first 5 digits will be its length,we need to download except 5 digits.
    can any one know how to do that.
    thanks in advance
    Mraj

    hi
    i need to download image from the url
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    first 5 digits will be its length,we need to download except 5 digits.
    can any one know how to do that.
    thanks in advance
    Mraj

  • Issue in loading images from Apache webserver in JSF image tags on WLS 10

    I have configured the apache webserver2.0 for passing on the request to weblogic 10.0. I have images in apache webserver. In my application on weblogic i am using JSF f. In JSF for <h:graphics> tag i am not able to load images from apache webserver. issue we found out that it prepend a context url on it.
              pls provide if u have any solution for it.
              Edited by neerajr at 11/16/2007 3:33 PM

    Hi, Neeraj,
              Are you actually telling <h:graphicImage>? As per html_basic.tld, the "uri" attribute is context-relative.
              Using "value" attribute instead of "url" attribute may be helpful. Something like
              <h:graphicImage id="fooImage" value="http://www.foosite.com/image/foo.jpg"/>
              This should work on WLS10.0 if you are using the JSF library bundled in it.
              Thanks,
              -Fred.

  • Linking an image from one page to an image within a slideshow on another page.

    I would like to link an image on my home page with an image within a slideshow on another page of my website. I can create the link, but when I click on the link, instead of taking me to the image within the slideshow, it takes me to the first image of the slideshow which I don't want. Is there a way to link to an image "within" the slideshow and not the first image?

    Hi
    You can create pages with specific images and then use link of images which will open the page with that specific image, link images within slideshow to show exact image within would not be possible with native Muse feature as by default slideshow will open the first image in target.
    Thanks,
    Sanjit

Maybe you are looking for

  • Problems importing footage with Canon GL-2

    I'm brand new to Mac & FCP, migrating from Casablanca after 8+ years. I've had no luck using the "Capture Batch" option, so I've reverted to "Capture Now"...after reading lots of issues with the gl2. "Capture Now", though very time consuming, seems t

  • Stuck while installing OAS 10.1.2 on RHEL 5

    OVERVIEW To relocate from and old server to a new server OLD: - OAS 10g (10.1.2.3) - RHEL4 - Oracle Database (10.2.0.4) NEW: - OAS 10g (10.1.2.3) - RHEL5 - Oracle Database (10.2.0.5) Completed following tasks: <li> Install 10g Database Sofware in "or

  • How to Resolve Error: An error as occurred during the move process.

    I am trying to MOVE folders from my Desktop to an External Drive. Error "An error as occurred during the move process. Some files may not have been processed." I regularly Move Folders and I've never had problems before. Why is this happening and how

  • Exception while installing TREX

    I create a local user as per the documentation ie. 'trex_01' and I don't see sapsys group on my machine so I assigned the user to IIS_WPG group. I'm trying to install 6.1.12. I didn't select the option 'Install HTTP Server' and rest are basic. ERROR

  • ALE Master Variant data distribution

    Hi all, I m working on ALE and I want to transfer data from System1 to System2.Data includes all related to material classification i.e class,characteristics,charistics values,material,variant tables,configuration profiles,dependencies,etc. I want to