Re: idl window resizing [message #12394] |
Thu, 30 July 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
akk (anilk@mtolympus.ari.net) writes:
> I have created an image which is an array of size 1024x1024. However when
> I use tvscl to view the image the idl display window which pops up is
> smaller than 1024x1024. Does someone know how I can change the size of
> the display window, so that I can view the entire image?
Just to be a little more helpful than I had time to
be in my earlier reply, this is a pretty big image.
It may help to resize it and display it in a window
that would actually fit on the display.
Window, XSize=512, YSize=512
TVSCL, Rebin(image, 512, 512)
Or, if you wanted it to be in a resizeable graphics
window, you could do this:
XWindow, 'TVImage', /Erase, XSize=500, YSize=500, $
BytScl(image, Top=(!D.N_Colors-1) < 255)
You can add a /Keep_Aspect_Ratio keyword to the
command above if you would like the image to maintain
it's square aspect ratio as you resize the window.
You will have to download the XWINDOW and TVIMAGE programs
from my web page.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: idl window resizing [message #12395 is a reply to message #12394] |
Thu, 30 July 1998 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
akk wrote:
> I have created an image which is an array of size 1024x1024. However when
> I use tvscl to view the image the idl display window which pops up is
> smaller than 1024x1024. Does someone know how I can change the size of
> the display window, so that I can view the entire image?
Try this:
;- Create a draw widget
base = widget_base()
draw = widget_draw( base, xsize=1024, ysize=1024, x_scroll_size=700,
y_scroll_size=700 )
widget_control, base, /realize
;- Get the window id and make sure the window is active
widget_control, draw, get_value = window
wset, window
;- Display a big image
data = rebin( dist(64), 1024, 1024 )
ncolors = !d.table_size - 1
tv, bytscl( data, top=ncolors )
Cheers,
Liam.
|
|
|
Re: idl window resizing [message #12396 is a reply to message #12394] |
Thu, 30 July 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
akk (anilk@mtolympus.ari.net) writes:
> I have created an image which is an array of size 1024x1024. However when
> I use tvscl to view the image the idl display window which pops up is
> smaller than 1024x1024. Does someone know how I can change the size of
> the display window, so that I can view the entire image?
Window, XSize=1024, YSize=1024
> p.s. I tried looking up the FAQs for this news group, however the web
> page contained no information.
Better get my book. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|