Re: eps output with xplot or fsc_surface [message #61685 is a reply to message #61683] |
Mon, 28 July 2008 09:55   |
humanumbrella
Messages: 52 Registered: June 2008
|
Member |
|
|
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
|
|
|