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

Home » Public Forums » archive » Re: cgwindow png export and window size
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: cgwindow png export and window size [message #80478] Thu, 14 June 2012 01:52
Kenda deLagrange is currently offline  Kenda deLagrange
Messages: 1
Registered: June 2012
Junior Member
thanks a lot! works like a beauty :)
Re: cgwindow png export and window size [message #80492 is a reply to message #80478] Wed, 13 June 2012 07:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> You can look, for example, at the
> keywords available in the PS2Raster file.)

Whoops! cgPS2Raster, of course. Sorry. :-)

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.")
Re: cgwindow png export and window size [message #80493 is a reply to message #80492] Wed, 13 June 2012 07:15 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem in PSM
Next Topic: New problem in loading image

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

Current Time: Wed Oct 08 11:41:21 PDT 2025

Total time taken to generate the page: 0.00551 seconds