|
|
Re: cgwindow png export and window size [message #80493 is a reply to message #80492] |
Wed, 13 June 2012 07:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Sebastian Schäfer writes:
> I am heavily using the cgwindow routines and their great export option
> with the pull-down menu (or the output command), using ImageMagicks
> convert function.
>
> However, I failed producing high resolution png files:
> cgwindow,wxsize=1600,xysize=200 for example looks perfectly fine on my
> screen, exporting it to png via ImageMagick rastering only gives me a
> 825x638 pixel png!? If I just select raster (without imagemagick) I
> get a 1600x512 pixel png (but without the nice fonts etc).
>
> So is there a way to produce nice looking (using ImageMagick I guess)
> png files with a given pixel number? pdf would also work, but
> unfortunately using the export to pdf option always creates DinA4 (or
> letter) format plots - fixing the aspect ratio (like you can do for
> the cgwindow itself) for the ps/pdf would also work I guess.
Normally, raster files are reduced in size to 25% of the PostScript
file size when they are created from cgWindow. This is so the
resulting raster is *approximately* the size of the graphics
window.
The way the raster output is created, however, is completely
configurable by keywords. (You can look, for example, at the
keywords available in the PS2Raster file.) In cgWindow, the keywords
are set either in cgWindow_SetDefs, if you want to configure
your output for all cgWindows, or with cgControl, if you want to
configure a specific cgWindow.
The keywords you are interested in are the keywords that
start with IM_********. In particular, you probably want
to set IM_DENSITY, IM_WIDTH, or IM_RESIZE to appropriate
values.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|