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

Home » Public Forums » archive » Re: eps output with xplot or fsc_surface
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: eps output with xplot or fsc_surface [message #61683 is a reply to message #61678] Mon, 28 July 2008 10:14 Go to previous messageGo to previous message
humanumbrella is currently offline  humanumbrella
Messages: 52
Registered: June 2008
Member
On Jul 28, 12:55 pm, humanumbre...@gmail.com wrote:
> On Jul 28, 12:34 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> David Fanning writes:
>>> I've even fooled around this morning trying to write this
>>> output directly to a PostScript file using the method outlined
>>> in this article:
>
>>>   http://www.dfanning.com/ographics_tips/object_eps.html
>
>>> This results in a PostScript file that cannot be opened with
>>> either Photoshop or GhostView. (IDL 7.0.1 on Windows.)
>
>> Whoops! Pilot error. If I select a PostScript printer, it
>> helps a lot.
>
>> I still can't control the aspect ratio of the output, etc.
>> But at least the output is starting to resemble what I see
>> in IDL when I import it into ImageReady.
>
>> I'm waiting to see what Justin has come up with.
>
>> Cheers,
>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> Hello,
>
> I'm still working on my portion of the solution, as far as getting
> what I want out of it, but the problem goes something like this:
>
> Let's say you want to save something to the file at 72 DPI.  This is
> the default resolution of looking at an image on the screen, so if you
> create a plot, save it at 72 DPI, then import it back into photoshop/
> ghostview/imageready, it will be the proper proportion, because it's
> mapping the screen dimensions which are in 72 DPI straight back to 72
> DPI, so the aspect ratio is preserved.
>
> However, when you go up in resolution, herein lies the problem.  In
> the XPLOT/FSC_SURFACE code, David is trying to perform the same
> operation with the same amount of real estate.  IE, trying to cram 300
> DPI into 640x480 results in a much, much smaller image.  However, if
> before we initialize the clipboard object, we redefine the dimensions
> of the window to what they SHOULD be, where the screen displaying X
> DPI where X > 72, all of a sudden magic happens.
>
> I am still refining this fix, but I didn't want you to have to wait
> forever. (:
>
> So, here's what I've come up with for now:
>
>  res = 72
>  IF filename NE '' THEN BEGIN
>  CASE whichFileType OF
>     'EPS-72' :begin
>       resolution = [2.54/72, 2.54/72] & res=72
>     end
>     'EPS-150':begin
>       resolution = [2.54/150, 2.54/150] & res=150
>     end
>     'EPS-300':begin
>       resolution = [2.54/300, 2.54/300] & res=300
>     end
>     'EPS-1200':begin
>       resolution = [2.54/1200, 2.54/1200] & res=1200
>     end
>     'EPS-2400':begin
>       resolution = [2.54/2400, 2.54/2400] & res=2400
>     end
>  ENDCASE
>  info.thisWindow->GetProperty, Dimensions=viewDimensions,
> Units=viewUnits
>
>  viewDimensions*=res/72
>
>  clipboard = Obj_New('IDLgrClipboard', Dimensions=viewDimensions,$
>    Resolution=resolution,Quality=2, units=viewUnits)
>      clipboard->Draw, info.plotView, /Postscript, /vector,
> Filename=filename

The above code creates a bigger image, and it comes back as the same
size as what you initially saved it as, but it is not necessarily more
detailed. I am continuing work on this and will report some more
findings (:
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Summing an array.
Next Topic: Removing some but not all spaces in a string

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

Current Time: Sun Oct 12 00:01:31 PDT 2025

Total time taken to generate the page: 0.01072 seconds