| Re: how to save image in full size [message #48994 is a reply to message #48993] |
Sun, 11 June 2006 08:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
heqjxiaoyao@163.com writes:
> How can i save my picture in full data size in IDL.
> The size of data is 2400*1800, but it is slowly to show full size in
> draw window,
> so i set the draw window's size is 800*600 and use the keyword:
> app_scroll,
> now the image shown in window is part of the full image , and i draw
> grid and vector overlap
> the image.
> But now i want to save the full size of image,How can i do this?
The way I typically handle this situation is to create
a coordinate system for the image. (The image coordinate
system is part of what an image "object" is in my code.)
The image overlays, then, are placed on the image in the
image coordinate system. This way, the image and its
associated overlays are resolution independent and can
be displayed in a window of *any* size, including the
"window" of a PostScript file.
The coordinate system for a typical image is easy to set up,
given a POSITION in the window, and XRANGE and YRANGE
values that describe the extent of the coordinate system
in X and Y. Here is the DRAW method of my coordinate object.
; ************************************************************ *********
PRO CatCoord::Draw, Extra=extrakeywords
@cat_pro_error_handler
; Set up the data coordinate space by setting scaling and window
; system variables.
; Calculate scaling factors.
self._xs = Normalize(self._xrange, Position=[self._position[0],
self._position[2]])
self._ys = Normalize(self._yrange, Position=[self._position[1], $
self._position[3]])
; Load system variables.
!X.S = self._xs
!Y.S = self._ys
!X.Window = [self._position[0], self._position[2]]
!Y.Window = [self._position[1], self._position[3]]
; Done.
self -> Report, /Completed
END
; ************************************************************ *********
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|