Re: Centering Image [message #67083] |
Tue, 23 June 2009 11:24 |
vikramivatury
Messages: 24 Registered: May 2009
|
Junior Member |
|
|
On Jun 23, 3:55 am, Phil Elson <philipel...@googlemail.com> wrote:
> You mean something like this?
>
> image=INDGEN(100,50)
> dims=SIZE(image,/DIM)
> screen_size=[!D.X_SIZE,!D.Y_SIZE]
> pos=(screen_size-dims)/2
> TVSCL, image, pos[0], pos[1]
Yes, that is exactly what I was looking for. Thanks Phil!
-Vikram
|
|
|
Re: Centering Image [message #67090 is a reply to message #67083] |
Tue, 23 June 2009 00:55  |
philipelson
Messages: 9 Registered: March 2009
|
Junior Member |
|
|
You mean something like this?
image=INDGEN(100,50)
dims=SIZE(image,/DIM)
screen_size=[!D.X_SIZE,!D.Y_SIZE]
pos=(screen_size-dims)/2
TVSCL, image, pos[0], pos[1]
|
|
|
Re: Centering Image [message #67099 is a reply to message #67090] |
Mon, 22 June 2009 10:29  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vikram writes:
> Thanks. Is there something with the TVSCL function?
Do you mean this:
IDL> TVImage, BytScl(image), POSITION=Aspect(1.0)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Centering Image [message #67100 is a reply to message #67099] |
Mon, 22 June 2009 10:02  |
vikramivatury
Messages: 24 Registered: May 2009
|
Junior Member |
|
|
On Jun 22, 12:58 pm, David Fanning <n...@dfanning.com> wrote:
> Vikram writes:
>> Is there any way of centering an image on a window with equal [x,y]
>> dimensions?
>
> IDL> TVImage, image POSITION=Aspect(1.0)
>
> ASPECT and TVIMAGE can be found at the usual places:
>
> http://www.dfanning.com/documents/programs.html
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks. Is there something with the TVSCL function?
-Vikram
|
|
|
Re: Centering Image [message #67101 is a reply to message #67100] |
Mon, 22 June 2009 09:58  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vikram writes:
> Is there any way of centering an image on a window with equal [x,y]
> dimensions?
IDL> TVImage, image POSITION=Aspect(1.0)
ASPECT and TVIMAGE can be found at the usual places:
http://www.dfanning.com/documents/programs.html
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|