Re: resizing image [message #39037] |
Mon, 12 April 2004 13:03 |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
> # Get screen size
> size = device, GET_SCREEN_SIZE=resolution
>
> # Resize the original image
> new_image = congrid(orig_image, resolution[0], resolution[1])
>
> # Display the new image
> window, XSIZE=resolution[0], YSIZE=resolution[1]
> tv, new_image
Silly me. I've been doing to much Python programming recently -- using
"#" instead of ";" for comments.
|
|
|
Re: resizing image [message #39040 is a reply to message #39037] |
Mon, 12 April 2004 09:24  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Presumably you want to display the image. In that case, use something like
IMDISP which automatically resizes the image to fit the graphics window:
http://www.gumley.com/PIP/Free_Software.html
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
"Benard Soret" <benard_soret@yahoo.com> wrote in message
news:750cd8c1.0404110945.783e0094@posting.google.com...
> Hi,
>
> I want to resize an image say 'rose.jpg'(examples/data) equal to my
> screensize. How can it be resized to screensize such that when I
> display it, It cover my whole screen. If in case it is not possible
> then upto what portion of monitor screen, it can be resized and how?
>
>
> Benard
|
|
|
Re: resizing image [message #39041 is a reply to message #39040] |
Mon, 12 April 2004 07:54  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
> I want to resize an image say 'rose.jpg'(examples/data) equal to my
> screensize. How can it be resized to screensize such that when I
> display it, It cover my whole screen. If in case it is not possible
> then upto what portion of monitor screen, it can be resized and how?
If you want to resize it such that the new dimensions are integer
multiples of the original dimensions, use rebin(). If the new
dimensions are not integer multiples of the original, use congrid().
# Get screen size
size = device, GET_SCREEN_SIZE=resolution
# Resize the original image
new_image = congrid(orig_image, resolution[0], resolution[1])
# Display the new image
window, XSIZE=resolution[0], YSIZE=resolution[1]
tv, new_image
|
|
|
Re: resizing image [message #39046 is a reply to message #39041] |
Sun, 11 April 2004 12:08  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Benard Soret wrote:
> Hi,
>
> I want to resize an image say 'rose.jpg'(examples/data) equal to my
> screensize. How can it be resized to screensize such that when I
> display it, It cover my whole screen. If in case it is not possible
> then upto what portion of monitor screen, it can be resized and how?
>
>
> Benard
Dear Benard
please have a look at rebin and congrid in the documentation
To get information about your screensize you could use the following
command:
device,get_screen_size=screen_size
screen_size is the size of your screen.
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|