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

Home » Public Forums » archive » Re: IMDISP and writing to Postscript
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: IMDISP and writing to Postscript [message #65904 is a reply to message #65903] Thu, 26 March 2009 19:39 Go to previous messageGo to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
On Mar 26, 7:13 pm, mooner <Emily.Wisnio...@gmail.com> wrote:
> Hi, I am using IDL to display some data. I find IMDISP to be perfect
> for this and it works great in 'x' windows. My image is (forgive me,
> I'm not quite sure how to describe this) is low resolution and I want
> it to be displayed as individual squares (of different colors) which
> IDL happily does in my x window. However when I write to postscript
> the image is 'blured' (I don't get well defined flat squares). I've
> played with all the keywords in device and imdsp but with no luck.
>
> Any suggestions?
>
> Cheers,
> Emily

Emily,

I can confirm that when your code sample is run in IDL 6.4 on OS X,
and the PostScript file is viewed with Preview.app, the image is
indeed smoothed. It appears to be happening in Preview when the
Postscript file is converted to PDF. I'm guessing that the same thing
will happen regardless of the IDL code used to display the image.

Here is a workaround, perhaps it will meet your needs. If your image
is truly small (less than 10 rows by 10 columns), you could always do
something like this:

nx = 5
ny = 5
a = findgen(nx, ny) ; original image
b = rebin(a, 100 * nx, 100 * ny, /sample) ; resampled image
loadct, 13
imdisp, b
pson, file='test.ps'
imdisp, b
psoff

The resampled image in test.ps will show the blockiness present in the
original image, since the resampled image is created via pixel
replication. Note that I've used imdisp.pro, pson.pro and psoff.pro
from

http://gumley.com/PIP/Sample_Programs/PIP_programs.zip

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to programmatically access the Available Band List
Next Topic: Maps and interpolation w/ invalid data points

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

Current Time: Thu Oct 09 19:55:57 PDT 2025

Total time taken to generate the page: 0.71873 seconds