comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: resizing image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: resizing image [message #39037] Mon, 12 April 2004 13:03
Michael Wallace is currently offline  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 Go to previous message
Liam Gumley is currently offline  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 Go to previous message
Michael Wallace is currently offline  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 Go to previous message
R.Bauer is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3D velocity vectors
Next Topic: vectorising versus loops

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:34:32 PDT 2025

Total time taken to generate the page: 0.96202 seconds