Re: get image from widget_draw [message #54246] |
Fri, 01 June 2007 04:15  |
Jo Klein
Messages: 54 Registered: January 2006
|
Member |
|
|
Your image variable doesn't persist between executions of pic_event. Put
a breakpoint in and see how the content of it vanishes. The
quick-and-dirty solution is to store it in a common block (sorry David
:) ), but there are better approaches e.g. storing your data in a uvalue.
Jo
|
|
|
Re: get image from widget_draw [message #54250 is a reply to message #54246] |
Fri, 01 June 2007 01:05   |
skymaxwell@gmail.com
Messages: 127 Registered: January 2007
|
Senior Member |
|
|
i saved image through TVRD function. Now i want output it to my
widget_draw. Use TVSCL (also try TV) procedure. My widget_draw become
full black color. in IDLDE i haven't any errors. so here is part of my
source code
PRO PIC_EVENT
WIDGET_CONTROL,pic,GET_VALUE=w_ID
WIDGET_CONTROL,event.id,GET_UVALUE=widget
WSET,w_ID
image=MAKE_ARRAY(3,600,400)
...
IF (widget EQ 'button_save') THEN BEGIN
image=TVRD(TRUE=1)
help,image
ENDIF
IF (widget EQ 'button_show') THEN BEGIN
TVSCL,image,TRUE=1
ENDIF
END
|
|
|
|
|
Re: get image from widget_draw [message #54376 is a reply to message #54246] |
Fri, 01 June 2007 11:13  |
skymaxwell@gmail.com
Messages: 127 Registered: January 2007
|
Senior Member |
|
|
i'm not sure...you mean this one ?
IF (widget EQ 'button_save') THEN BEGIN
;image=TVRD(TRUE=1)
WIDGET_CONTROL,pic,GET_UVALUE=image
;help,image
ENDIF
IF (widget EQ 'button_show') THEN BEGIN
;TVSCL,image,TRUE=1
WIDGET_CONTROL,pic,SET_UVALUE=image
ENDIF
|
|
|