JWAVE User Guide > JWAVE Wrapper API > PACKIMAGE Procedure   
  

PACKIMAGE Procedure   
Stores an image into an associative array.
Usage
PACKIMAGE, ret_asarr, key_name
Input Parameters
ret_asarr—The associative array that will contain the image. If ret_asarr is undefined, PackImage will create ret_asarr. This image will become an HTML IMG element.
key_name—A scalar string naming the key that will reference the image in ret_asarr.
Keywords
ismap—If present and nonzero, the HTML IMG element generated from the image in ret_asarr will have the ISMAP attribute set.
tags—A scalar string containing additional IMG attributes to set.
Discussion
If ret_asarr is undefined at the time of calling PackImage, ret_asarr is created with two keys. If ret_asarr is defined at the time of calling PackImage, then two keys are added to ret_asarr. The two keys are:
*key_name—References the 2D image array.
*key_namecolorMap—References the 3xN array of RGB color values, where N is the number of colors in the colortable, maximum of 256. The array is defined as:
*(ret_asarr('key_namecolorMap'))(0,*) = red intensity values
*(ret_asarr('key_namecolorMap'))(1,*) = green intensity values
*(ret_asarr('key_namecolorMap'))(2,*) = blue intensity values
Additional keys will be added to ret_asarr if the keywords Ismap and/or Tags are set (key_nameismap and key_nametags respectively).
Example
; Use PackImage to return image of surface defined by: 
; f(x,y) = xSIN(y) + yCOS(x),   -10 <= x,y, <= 10
SetImageSize, 500, 500
LOADCT, 5
x = FINDGEN(101)/5-10
y = x
z = FLTARR(101, 101)
FOR i = 0, 100 DO $
FOR j=0, 100 DO z(i, j)=x(i)*SIN(y(j)) + y(j)*COS(x(i))
SHADE_SURF, z, x, y, Ax=50, XCharsize=2, YCharsize=2, $
ZCharsize=2
XYOUTS, 163, 477, "f(x, y) = x*SIN(y) + y*COS(x)", $
Charsize=2, /Device
PackImage, ret_asarr, 'surface', /Ismap, $
Tags='border="0" allign="center" ' + $
'alt="Surface of f(x,y), Click to Zoom"'
RETURN, ret_asarr
See Also
PACKTABLE,   SETIMAGESIZE

Version 3.6
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.