getImage(string)

Loads an image file from a Java resource or string. The getImage() method checks whether the argument specifies a valid resource. If it does not specify a resource, then getImage() treats the parameter as an encoded image. Both ASCII Hex and ASCII85 are supported (useful for XML data).

Parameters

string image file resource path or URL

or

ascii hex/ascii85 encoded gif/jpeg image data

Example

var img = getImage('/com/mypackage/icon.gif');

img =

 getImage('http://chart.inetsoft.com/images/inetsoft.png');

Example

// picture column is ascii85 encoded gif image

for(var r = 1; r < table.length; r++) {

   var img = getImage(table[r]['picture']);

   table[r]['picture'] = img;

}

See Also

Displaying Images in Table Cells, for a common application of getImage().

<< newInstance(name) © 1996-2013 InetSoft Technology Corporation (v11.4) isNull(object) >>