Smooth scrolling zoom in draw widget; how? [message #7837] |
Thu, 09 January 1997 00:00  |
kak
Messages: 16 Registered: February 1995
|
Junior Member |
|
|
I use a scrollable draw widget to display large images (up to 2048x2048)
at full resolution (viewport is 512x512 or 1024x1024 depending
on screen resolution).
The problem is: users want to zoom into images and keep the smooth
scrolling viewport for the expanded image . If I simply blow up my image
by the required factor, the size will quickly increase beyond
the computers memory.
I thought about keeping the original byte scaled image as byte array
or as pixmap. For each viewport scroll event I would calculate the
portion of the zoomed image to display from the current viewport
coordinates. Then I would take the respective subarray of the image
and extend it using rebin(subarr, view_port_x, view_port_y, /sample)
and finally display it in the viewport.
I doubt that this is efficient enough to provide the illusion of smooth
scrolling.
Has anybody a better idea?
Karl
--
--
IPP, PO Box 1533 | Phone: +49-89-3299-1655 | E-Mail:
D-85740 Garching | FAX : +49-89-3299-1149 | krieger@ipp.mpg.de
|
|
|
Re: SMOOTH [message #9347 is a reply to message #7837] |
Fri, 20 June 1997 00:00  |
pit
Messages: 92 Registered: January 1996
|
Member |
|
|
In article <33A960A1.17B7@astrosun.tn.cornell.edu>,
JD Smith <jdsmith@astrosun.tn.cornell.edu> writes:
> In my case, I was smoothing a positive definite
> image, and the smoothed image contained bands of negative values! I
> think arrays which contain a wide dynamic range of values are most
> susceptible. Converting to double precision seems to solve the problem,
Maybe it's an overflow like in
IDL> print,32767+10
-32759
Shure this would be a bug, but it explains the behaviour
Peter
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Peter "Pit" Suetterlin http://www.uni-sw.gwdg.de/~pit
Universitaets-Sternwarte Goettingen
Tel.: +49 551 39-5048 pit@uni-sw.gwdg.de
-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V. Tel.: +49 7641 3492
____________________________________________________________ ______________
|
|
|