How to display image through script

Hi,
In my template I am passing image path through xml, I need to display this image on XDP template.
Please help for the same,
I tried
ImageField1.resolveNode("value.#image").href = "C:\\logo.jpg";
Image1.resolveNode("value.#image").url=".\logo.jpg";
But it doesn't help, Is I am doing any mistake or is there any other way.
Thanks,
Abhijit

Got the solution,
first need to convert the imge into base 64 encoded string, and then pass it through xml.
do the binding with imageField, and make it readonly.
To covert image into base4 use below code
//convert image file into byte array this case - buf
String base64EncodedStr =
new sun.misc.BASE64Encoder().encode(buf);

Similar Messages

  • How to display image?

    Hi all,
    How to display image from the database table in the adobe form by using web dynpro abap?
    I want to display image in the adobe interactive form by using web dynpro abap.
    Please help me.
    Regards,
    srini

    Hi Srini,
    If you go through the article you might have seen the following piece of code
    *** Send the values back to the node
      lo_el_z_if_test_cv->set_static_attributes(
        EXPORTING
          static_attributes = ls_z_if_test_cv ).
    " here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
    " In  your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
    How is your image stored in your database table ?
    Regards,
    Radhika.

  • How to display images on my internal isight?

    Hi,
    I just bought the new iMac 2 gig dual. Running on 10.5.2.
    I wanted to know how to display images on my screen during a video conference chat without resorting to holding up a print out to the camera? I need something where I can switch from video mode to image mode and show a single image at a time if I need to. All that while still talking of coarse. If it isn't possible with my iSight software, can you point me to other software I can download and still use my built in cam?
    I hope I was clear enough in asking this.
    Thanks
    Liban

    Welcome to Apple Discussions, Liban
    iChat can do what you want, but I do not know of any web-based video chat site that can.
    Look for Help or Support information on the site you are using or ask the Webmaster if his site has the capability to do what you want.
    EZ Jim
    PowerBook 1.67 GHz w/Mac OS X (10.4.11) G5 DP 1.8 w/Mac OS X (10.5.2)  External iSight

  • How to send images through PI using SOAP adapter

    hi,
    Can anybody tell me how to send images through PI using SOAP adapter.
    Regards ,
    Loveena

    Hi Loveena,
    only as attachments of a SOAP message.
    Regards,
    Udo

  • How to display images and information

    how to display images and information(e.g. like questions) on a jsp page that stored in a database

    Look As far as i can see....
    Utlimately every file could be expressed as a bytes buffer.
    so say if you have a bean called Choice Bean which is expressed as
    public class ChoiceBean{
       private String choiceid;
       private String choicedesc;
       private byte image[];
       public void setChoiceId(String choiceid){
              this.choiceid = choiceid;
        public String getChoiceId(){
               return this.choiceid;
          public void setChoiceDesc(String choicedesc){
               this.choicedesc = choicedesc;
           public String getChoiceDesc(){
               return this.choicedesc;
           public void setImage(byte image[]){
                  this.image = image;
             public byte[] getImage(){
                  return this.image;
    }QuestionList.java:
    ===============
    public class QuestionList{
         private List<ChoiceBean> choicelist;
          /*Other member variable declarations*/
           public  List<ChoiceBean> getChoiceList(){
                    /*Custom code where you may build the list by querying the DA layer*/
                     return this.choicelist;
         public int search(String choiceid){
                 int index = -1;
                 for(int i =0 ; i < this.choicelist.size() ; i++){
                        ChoiceBean cb = this.choicelist.get(i);
                         if(cb.getChoiceId().equals(choiceid)){
                                index = i;
                                break;
                 return index;
        /* Other member method declarations */
    }and you are retreving List<ChoiceBean> from DB using your query & have created a session attribute / <jsp:useBean> named ChoiceList
    NOTE: sometimes your application server can go out of bounds as you are consuming a lot of memory by creating an arraylist object.
    use the following methodology to display images & choices
    sample.jsp:
    =========
    <jsp:useBean id="QuestionList"  class="com.qpa.dao.QuestionList" scope="session"/>
    <TABLE>
    <%
    /* QuestionList.getChoiceList() is a method which fetches data from the DB & returns it in form of  List<ChoiceBean> */
    List<ChoiceBean> choicelist = QuestionList.getChoiceList();
    for(int i =0 ; i < choicelist.size() ; i++){
    %>
    <TR>
    <TD><%!=choicelist.get(i).getChoiceId()%></TD>
    <!-- calling servlet which renders an images in JPG format based upon given choiceid(unique field) -->
    <TD><IMAGE src="ImageServlet?choiceid=<%!=choicelist.get(i).getChoiceId()%>"/> </TD>
    <TD><%!=choicelist.get(i).getChoiceDesc()%></TD>
    </TR>
    <%
    %>
    </TABLE>
    <%
        session.remove("QuestionList");
    %>
    NOTE: usage of JSTL or any other custom built tag-libraries makes life more simpler in the following case
    ImageServlet.java:
    ===============
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            byte buffer[] = null;
            HttpSession session = request.getSession(false);
            /*getting the QuestionList from the session*/
            QuestionList ql = null;
            String choiceid = new String("");
            try{
                 choiceid = request.getParameter("choiceid");
                 /*getting the QuestionList from the session*/
                ql = (QuestionList)  session.getAttribute("QuestionList");
            } catch(Exception exp){
            if(choiceid.equals("") == false &&  ql != null ){
                List<ChoiceBean> clist = QuestionList.getChoiceList();           
                   assuming that you have created a serach method which searches the entire choice list and would give you
                   the index of that object which is being refered by unique choiceid and returns -1 if not found
                int index =  QuestionList.search(choiceid);
                if(index != -1){
                   ChoiceBean cb = clist.get(index);
                   buffer = cb.getImage();
            if(buffer != null){
                 // assuming that we have stored images in JPEG format only
                 JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
                 BufferedImage image =decoder.decodeAsBufferedImage();
                 response.setContentType("image/jpeg");
                 // Send back image
                 ServletOutputStream sos = response.getOutputStream();
                 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
                 encoder.encode(image);
            } else {
               response.setContentType("text/html");
               response.getWriter().println("<b>Image data not found</b>");              
    }However,i still feel there are few loopholes with this approach where Application Server can eat up a lot of heap space which may result in outofmemorybound exception.
    Hope this might help :)
    REGARDS,
    RaHuL

  • Transform implementation goes wrong when I try transforming a image through script and save the new image using a HTML to canvas plugin.

    Transform implementation goes wrong when I try transforming a image through script and save the new image using a HTML to canvas plugin. The rotation comes up fine, but the origin of the transformation is faulty (compared to other browsers like Chrome & IE)

    A good place to ask advice about web development is at the mozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the mozillaZine forum site in order to post at that forum.

  • How to read bytes(image) from a server ?how to display image after read byt

    How to read bytes(image) from a server ?how to display image after reading bytes?
    i have tried coding tis , but i couldnt get the image to be display:
    BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
    int length1;
    byte [] data=new byte[1048576];
    if((length1=in1.read(data))!=-1){
    System.out.println("???");
    }System.out.println("length "+length1);
    Integer inter=new Integer(length1);
    byte d=inter.byteValue();

    didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?

  • How to load the Employee Images through Script

    Dear All,
    How to load Employee Images into HRMS module through script, Pls provide scripts any body having..
    Thank in advance,
    Hanimi
    Edited by: Hanimi on Jun 7, 2011 10:12 AM

    Hi Hussain,
    Following ctl file is working fine for loading images, But problem is at a time it is loading only 64 rows, pls let me know what i have change in my ctl file for loading all data at a time..
    load data
    infile '/usr/tmp/Images_Data.dat'
    INTO TABLE PER_IMAGES
    append
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS(
    parent_id,
    table_name constant "PER_PEOPLE_F",
    ext_fname FILLER CHAR(80),
    "IMAGE" LOBFILE(ext_fname) TERMINATED BY EOF,i
    mage_id "PER_IMAGES_S.nextval"
    Thanks,
    Hanimi..

  • How to check the resolution of the image through scripting

    How to check the raster image resolution in illustrator through script?

    Thanks for your reply.
    I have found another script which returns the dpi of linked images.
    I am not so good in scripting could you have a look in this and convert to RasterItem.resolution.
    var docRef = activeDocument;
    with (docRef) {
    // We are expecting 1 placed item (image) here!!!
    var placedWidth = placedItems[0].width;
    var placedHeight = placedItems[0].height;
    var placedPath = placedItems[0].file;
    // The 2 variables below are global
    XpixelDimension = 0;
    YpixelDimension = 0;
    // Call the function
    exifDimensions(placedPath);
    // Calculate the Height & Width DPI's
    var widthDPI = Math.floor(XpixelDimension / (placedWidth / 72));
    var heightDPI = Math.floor(YpixelDimension / (placedHeight / 72));
    alert('Width DPI is ' + widthDPI + ' Height DPI is ' + heightDPI);
    function exifDimensions(imageFilePath) {
    imageFilePath.open('r');
    try {
    while (imageFilePath.tell() < imageFilePath.length) {
    var line = imageFilePath.readln();
    var idxOf = (line.indexOf('<exif:PixelXDimension>') > -1) ? line.indexOf('<exif:PixelXDimension>') : line.indexOf('<exif:PixelYDimension>');
    if(idxOf > -1) {
    if(line.indexOf('<exif:PixelXDimension>') > -1) XpixelDimension = parseInt(line.substring(line.indexOf(">")+1, line.lastIndexOf("<")));
    else YpixelDimension = parseInt(line.substring(line.indexOf(">")+1, line.lastIndexOf("<")));
    catch (ex) { alert('Fluff');}
      finally { imageFilePath.close(); return [XpixelDimension, YpixelDimension]; }
    Thanks in advance
    Vinoth

  • How to display Image by using Array?

    Hi all, I know to how to display the image in MXML by using
    AS 3.0
    like this:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100" height="80" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    [Embed(source="logo.gif")]
    [Bindable]
    public var imgCls:Class;
    ]]>
    </mx:Script>
    <mx:Image source="{imgCls}"/>
    <!--OR-->
    <mx:Image source="@Embed('assets/Nokia_6630.png')"/>
    </mx:Application>
    But the thing is I am building a list for display the images,
    the values is come from the Array. I am trying a different way for
    display it but no working, here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    public var PICTURE_ARRAY:Array = [{label:"FileA",
    icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileB", icon:"@Embed('upload/myjpg.jpg')"}]
    ]]>
    </mx:Script>
    <mx:Tile id="pictureSelection" height="180" width="500"
    borderStyle="solid">
    <mx:Repeater id="picRP"
    dataProvider="{PICTURE_ARRAY}">
    <mx:VBox horizontalAlign="center" verticalAlign="middle"
    verticalGap="0" borderStyle="none" width="100" height="100">
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    <!--
    I also tryed this as well:
    set the icon value as picture location like: "A.jpg" or
    "B.jpg"
    then
    <mx:Image width="80" height="80"
    source="@Embed('upload/{picRP.currentItem.icon}')" />
    -->
    <mx:Label text="{picRP.currentItem.label}" width="100"
    textAlign="center"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:Tile>
    </mx:Application>
    Can anyone tell how to display the array value into Image
    tag? Thanks

    In your data you have this:
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    change it to this:
    {label:"FileC", icon:"upload/myjpg.jpg"}, // this is just the
    filename, not embedded
    In your Repeater you have this Image tag:
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    which is fine, except for the toolTip. The toolTip uses a
    string, not an image. If you want to show an image in the toolTip,
    you'll need to write your own toolTip class.
    Now the source property of the image will be given the URL to
    the image which will then be requested from the server and
    downloaded at runtime - it is not embedded.
    If you need to embed the images, then your dataProvider
    should have the variable name associated with the embedded
    image.

  • Displaying Images through Servlets

    I am using Servletrunner utility to run my servlets. How can I display Images along with other HTML text, to the Browsers through Servlets?

    Print out the <img> tag. The URL you use may in turn reference another servlet that produces an image. You can look at the Java2D (and perhaps Java3D, if you want 3D images) to help you produce the images.

  • How to display images in a Jtable cell-Urgent

    Hay all,
    Can anybody tell me that can we display images to JTable' cell,If yes the how do we do that(with some code snippet)? Its very urgent .Plz reply as soon as possible.

    Here is an example
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    class SimpleTableExample extends JFrame
         private     JPanel  topPanel;
         private     JTable  table;
         private     JScrollPane scrollPane;
         public SimpleTableExample()
              setTitle( "Table With Image" );
              setSize( 300, 200 );
              setBackground( Color.gray );
              topPanel = new JPanel();
              topPanel.setLayout( new BorderLayout() );
              getContentPane().add( topPanel );
              // Create columns names
              String columnNames[] = { "Col1", "Col2", "Col3" };
              // Create some data
              Object data[][] =
                   { (ImageIcon) new ImageIcon("User.Gif"), (String) "100", (String)"101" },
                   { (String)"102", (String)"103", (String)"104" },
                   { (String)"105", (String)"106", (String)"107" },
                   { (String)"108", (String)"109", (String)"110" },
              // Create a new table instance
    DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable( model )
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              };          // Add the table to a scrolling pane
              scrollPane = new JScrollPane( table );
              topPanel.add( scrollPane, BorderLayout.CENTER );
         public static void main( String args[] )
              SimpleTableExample mainFrame     = new SimpleTableExample();
              mainFrame.setVisible( true );
    }

  • How to display images in a table column?

    Hi,
    In a VC model, I have to display images in a table column for each record found.
    How can this be done?
    Regards,
    Nitin

    Hi Nitin,
    It can be done by adding to the table the Image control (can be found under Advanced Controls in the Compose panel).
    In the URL property (in the Configure panel of the Image control) you can define any expression that will return the image URL. For example:
    ="http://hosting.site.url/"&@ImageNameField
    Regards,
    Udi
    Edited by: Udi Cohen on Jun 11, 2008 1:39 PM

  • How to display text in script as same as text in news paper

    Hi Expets
    I have a requirement i need to display text in script as same as text displayed in news paper
    with out creating any windows. iie ( Abcdef should be in one cloum after some space i need to display 1234)
    please let me know how can i achieve this
    Ex
    1.
    hi abcdef           12345
        abcedf          12345
    abcedf            12345
    Regards
    Suresh
    Edited by: suribabu124 on Jun 15, 2010 7:55 AM

    Hi,
    If you need to print a form like news paper you need go for multiple main windows.We know that we can use 99 main windows in one page.first create one main window and then leave a space then create one more window and select window type as mainwindow.
    while populating data,after completion of one main window the control will move to next main window,which is in the same page.
    Like this you need to analyse and code according to your requirement.

  • How to display images in TextArea? and how to make some of the text clickab

    1) How do i make TextArea display images?
    (example a client program, where people chat, put :) and get a smily image)
    2) For example if text is http://www.something.com in textArea, a person can click it, and my custom dialog will apear saying something about this link.......

    This has been discussed very many times! It is solvable. Search the forum!
    one way is to make a custom textarea extending Canvas, and painting the text in the paint() method. You need a paint method with drawString and drawImage calles to make it the way you describe it. You also need to add a MouseListener for detection of clicking.

Maybe you are looking for

  • Cube Problem

    Hi Friends, I'm unable to see cube on infopackage level.I have created infopackage but my datatarget(cube ) not coming. 1. Infocube ( Activated executable) 2. Update rules activated (Everything perfect) 3. I checked infosourece (Correct) 4. Infosourc

  • Drop Down Menu Choices

    Since the changeover to BT home page I can't use drop down choice menus for online banking or online purchasing.  They work ok on Firefox and Google Chrome but not on BT.  Have Vista on 2 computers and Windows 8 on the other one, same problem so it's

  • TerminalServices-SessionBroker not reconnecting to existing session

    I have 1 SessionBroker configured as dedicated farm redirector for a farm of 6 TerminalServices-SessionHosts. The TerminalServices-SessionHosts are configured in GPO where I specify RD Connection Broker farm name and RD Connection Broker server name.

  • Introscope host adapter

    Hi I am using solution manager 7.1 sp10 While configuring our new server in managed system configuring on step 7 configure automatically I get error at introscope host adater as below: CX_AI_SYSTEM_FAULT : SOAP:1.023 SRT: Processing error in Internet

  • When I try and copy a picture from this PDF the dimentions are reversed

    I have this pdf of a map for a dungeons and dragons game I'm playing with some friends. The pictures on the pages are (for some reason) split into smaller pictures that I want to stitch together in photoshop late, but whenever I try and copy an image