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

Home » Public Forums » archive » Blurred display of images in PDFs created from EPS on Mac OS X
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
Blurred display of images in PDFs created from EPS on Mac OS X [message #42304] Thu, 03 February 2005 09:03 Go to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
I often make false colour maps of data in IDL and export as EPS
graphics which I used to import into FrameMaker documents. I have
recently migrated from Solaris to Mac OS X and plan to use Pages and
Keynote (I know, Pages is not a FrameMaker replacement, but that
another story.) Anyway, there is an irritating quirk in the way Mac OS
X displays the PDFs created from EPS files - the image embedded in the
graphic (say, a 20 by 20 array) is displayed upsampled and horribly
blurred. This is the case in Preview and Keynote, but not Acrobat 7
which shows it nice and crisp. Keynote shows the PDF image blurred in
editing and as a slide-show, but it does export a sharp PDF. Whilst
this is workable, it does mean not using the native Keynote slide-show
mode.

This is evidently a Mac OS X quirk, rather than anything to do with
IDL. However, despite some searching, I can't find any mention of it
any of the Apple lists etc. Furthermore, it may be something that only
occurs with arrays (i.e. images) embedded in EPS files - something IDL
users are likely to produce, which is why I've posted here.

Any ideas?

-John Mardaljevic
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42399 is a reply to message #42304] Tue, 08 February 2005 01:36 Go to previous messageGo to next message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
jm@dmu.ac.uk wrote:

>> Maybe your program mis-interprets some PostScript elements, such
>> as pixmaps?
>
> It's more something fundamental to the display system in OSX.

I hope it is not but rather a feature of the program you use.

>> How did you define the size of the area that TV should fill in?
>
> Much as you did, only in cm. Am I right in guessing that you're not
> using
> OSX?

I used Windows XP for that to find out what elements of PostScript
are used by IDL. The IDL plotting devices (PS is one of them) does
not depend on the operating system, so I'm pretty sure that if
IDL translates TV into the PS image operator (using Windows XP)
it will do so using OSX.

I tried a couple of PS interpreters to find how they in turn handle
the image operator and all of them filled the rectangles specified
by image with constant color. No interpolation occured.

> I hope there's a few OSX users out there that repeat this quirk
> with
> their own code. Better still if they could show that it's *me* that's
> not getting
> it right....

So you should contact the author/service team/who ever of the program
that causes the image operator to interpolate.

Norbert
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42406 is a reply to message #42304] Mon, 07 February 2005 10:50 Go to previous messageGo to next message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Mon, 07 Feb 2005 08:50:38 -0800, jm wrote:

> Didn't work for me. Also, just made a PDF from the EPS using Adobe
> Distiller. No change.

OK, another item to investigate is to run the ColorSync utility. I
noticed that there is a filter setting that controls PDF image
interpolation. I do not know how to get this filter setting applied when
using Preview, but I bet the answer is in this area.

Karl
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42407 is a reply to message #42304] Mon, 07 February 2005 10:12 Go to previous messageGo to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
> I can confirm it using your pdf and I can also see it in other images
I've
> created at very high zooms. It's nothing you're doing wrong that I
can
> see.
>
> Maybe if you tried upsampling the array you use within IDL, so that
each
> 'pixel' in the plot is blown up to an n by n grid all of the same
colour?
> That may persuade OS X to at least use narrow regions to interpolate
over.

Thanks for trying it out. Yes, the upsampling did occur to me. Though
I
must admit the 'purist' in me thought that was too high a price to pay
just to
use the gee-whizz transitions in Keynote. I can still use Keynote to
make PDFs.
Heck, I'm even thinking of moving to Tex (TexShop) since Framemaker on
OSX
is not an option. Can't get more 'purist' than that.

Thanks again,

-John
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42409 is a reply to message #42304] Mon, 07 February 2005 09:00 Go to previous messageGo to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
jm@dmu.ac.uk wrote:
> That would be a last resort. I'd hope that maybe there will some
> option
> introduced at a later date (Tiger?).

http://www.apple.com/macosx/feedback/ - make sure you tell them you want
it!

--
Edd
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42410 is a reply to message #42304] Mon, 07 February 2005 08:57 Go to previous messageGo to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
jm@dmu.ac.uk wrote:
>> How did you define the size of the area that TV should fill in?

> Much as you did, only in cm. Am I right in guessing that you're not
> using
> OSX? I hope there's a few OSX users out there that repeat this quirk
> with
> their own code. Better still if they could show that it's *me* that's
> not getting
> it right....

I can confirm it using your pdf and I can also see it in other images I've
created at very high zooms. It's nothing you're doing wrong that I can
see.

Maybe if you tried upsampling the array you use within IDL, so that each
'pixel' in the plot is blown up to an n by n grid all of the same colour?
That may persuade OS X to at least use narrow regions to interpolate over.

--
Edd
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42411 is a reply to message #42304] Mon, 07 February 2005 08:50 Go to previous messageGo to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
Didn't work for me. Also, just made a PDF from the EPS using Adobe
Distiller. No change.
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42412 is a reply to message #42304] Mon, 07 February 2005 08:49 Go to previous messageGo to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
Karl Schultz <k____schultz@rsinc.com> wrote:
> On Mon, 07 Feb 2005 06:05:17 -0800, jm wrote:

>> I don't think it's anything to do with how the PDF was created.
>> It's 'simply' Aqua is trying to be helpful: "Here is a graphic
>> comprised
>> of only a fews tens of image (i.e. scaleable postscript) pixels shown
>> using tens of thousands of (LCD) display pixels - I will smooth it out
>> to look *nicer*".

> This discussion was posted to uk.comp.sys.mac where there is a solution
> offered involving changing the PDF workflow to turn off image
> interpolation.

That doesn't work for me.

--
Edd
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42413 is a reply to message #42304] Mon, 07 February 2005 08:47 Go to previous messageGo to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
> Maybe your program mis-interprets some PostScript elements, such
> as pixmaps?

It's more something fundamental to the display system in OSX.

> How did you define the size of the area that TV should fill in?

Much as you did, only in cm. Am I right in guessing that you're not
using
OSX? I hope there's a few OSX users out there that repeat this quirk
with
their own code. Better still if they could show that it's *me* that's
not getting
it right....

-John
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42414 is a reply to message #42304] Mon, 07 February 2005 08:39 Go to previous messageGo to next message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Mon, 07 Feb 2005 06:05:17 -0800, jm wrote:

> I don't think it's anything to do with how the PDF was created.
> It's 'simply' Aqua is trying to be helpful: "Here is a graphic
> comprised
> of only a fews tens of image (i.e. scaleable postscript) pixels shown
> using tens of thousands of (LCD) display pixels - I will smooth it out
> to look *nicer*".

This discussion was posted to uk.comp.sys.mac where there is a solution
offered involving changing the PDF workflow to turn off image
interpolation.

Karl
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42415 is a reply to message #42304] Mon, 07 February 2005 08:32 Go to previous messageGo to next message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Mon, 07 Feb 2005 06:05:17 -0800, jm wrote:

> That would be a last resort. I'd hope that maybe there will some
> option
> introduced at a later date (Tiger?).
>
> As Acrobat displays it fine, I guess it's "hard-wired" into
> applications at
> present. Adobe seem to have diverged a little from Apple's default
> imaging model - if so, I can see why.
>
> Here's the original PDF if anyone wants to try out any ideas - view it
> in both Acrobat and any of Preview/Keynote/Pages:
>
> http://www.iesd.dmu.ac.uk/~jm/pickup/lum_int093_92_12h00.pdf
>
> I don't think it's anything to do with how the PDF was created.
> It's 'simply' Aqua is trying to be helpful: "Here is a graphic
> comprised
> of only a fews tens of image (i.e. scaleable postscript) pixels shown
> using tens of thousands of (LCD) display pixels - I will smooth it out
> to look *nicer*".
>
> -John

This discussion was also posted to uk.com.sys.mac where a
promising-looking solution involving creating a PDF workflow with image
interpolation turned off is discussed.

Karl
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42416 is a reply to message #42304] Mon, 07 February 2005 08:17 Go to previous messageGo to next message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
jm@dmu.ac.uk wrote:

> The false colour map (byte-scaled array) is displayed (written to the
> Postscript device)
> using TV just like any other image. It just happens to have small
> pixel dimensions.

Maybe your program mis-interprets some PostScript elements, such
as pixmaps? If I understand PS correctly there is no such thing
as a pixel on the input side of PS. A bitmap fed into PS is an
area which has to be filled with scalable rectangles. When printing
the PS engine (of course) has to translate the rectangles into
device pixels, and it might apply some low pass filtering to avoid
moiree.

Maybe the PS generator of IDL did something to fool your program.
I used the following program for a check:

IDL> set_plot, "PS"
IDL> tvscl, dist(20,30), xsize=5, ysize=5, /inch
% Compiled module: DIST.
IDL> exit

That resulted in PS code that looks like (the comment lines
are my interpretation):

%% Setup scaling 72/2540 as needed for a device with 2450 DPI res.
$IDL_DICT begin 54 360 translate 0.0283465 dup scale

%% Scale a 20x30 bitmap to 5x5 inch ( 12700 pixel on output)
12699 12699 scale 20 30 4 [20 0 0 30 0 0]

%% use the image operator to input the matrix
/J { currentfile picstr readhexstring pop} bdef
{J} image
001234567787765432100112345678887654321111233456789876543321 223
[snipped]

... which looks correct to me.

How did you define the size of the area that TV should fill in?

Regards,
Norbert
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42418 is a reply to message #42304] Mon, 07 February 2005 06:05 Go to previous messageGo to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
That would be a last resort. I'd hope that maybe there will some
option
introduced at a later date (Tiger?).

As Acrobat displays it fine, I guess it's "hard-wired" into
applications at
present. Adobe seem to have diverged a little from Apple's default
imaging model - if so, I can see why.

Here's the original PDF if anyone wants to try out any ideas - view it
in both Acrobat and any of Preview/Keynote/Pages:

http://www.iesd.dmu.ac.uk/~jm/pickup/lum_int093_92_12h00.pdf

I don't think it's anything to do with how the PDF was created.
It's 'simply' Aqua is trying to be helpful: "Here is a graphic
comprised
of only a fews tens of image (i.e. scaleable postscript) pixels shown
using tens of thousands of (LCD) display pixels - I will smooth it out
to look *nicer*".

-John
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42419 is a reply to message #42304] Mon, 07 February 2005 05:17 Go to previous messageGo to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
jm@dmu.ac.uk wrote:
> Ben,

> The code is not the problem; it's an OSX quirk. Image smoothing seems
> to be built-in to Aqua.
> There's nothing wrong with the PDFs produced by OSX apps (other than
> being a bit bloated
> compared to Adobe distilled PDFs). In fact, in this example screen
> grab:

Yeah, I can see what you mean. Have you tried exporting to a high
resolution bitmap?

Obviously you lose some quality by doing so (eg in any vector-based stuff
like text), but if you're using it only for a presentation then you can
pick an appropriate resolution for it.

Not an ideal solution but it should be workable.

--
Edd
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42433 is a reply to message #42304] Fri, 04 February 2005 07:36 Go to previous messageGo to next message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
Ben,

The code is not the problem; it's an OSX quirk. Image smoothing seems
to be built-in to Aqua.
There's nothing wrong with the PDFs produced by OSX apps (other than
being a bit bloated
compared to Adobe distilled PDFs). In fact, in this example screen
grab:

http://www.iesd.dmu.ac.uk/~jm/pickup/grab.gif

the EPS was converted to PDF using the Preview application - which
shows it here mushy.
The false colour map (byte-scaled array) is displayed (written to the
Postscript device)
using TV just like any other image. It just happens to have small
pixel dimensions.

The mushy lower image is what the PDF looks like in Keynote also. The
upper is how it
should look (displayed here in Acrobat). Frustratingly, if you hold
down the mouse
whilst resizing in Keynote the image looks OK... until you let go of
the mouse button
and the smoothing mushes up the image again. PDFs created by Keynote
are fine (just as
they are with Preview). But it rules out using native Keynote for a
presentation - which is
a pity (unless I can turn the smoothing off).

Niggles aside, the transition from Solaris to OSX has been a joy. The
only application I miss
having is Framemaker.

Regards,

-John Mardaljevic
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42474 is a reply to message #42304] Wed, 09 February 2005 11:04 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1107944532.682495.318430@z14g2000cwz.googlegroups.com>,
jm@dmu.ac.uk wrote:

> Thanks, Ken. I think someone at RSI may also bring it to Apple's
> attention.
> I'm sure that it will take a few nudges to get this noticed by Apple.
>
> -John Mardaljevic

I think the best approach is to tell Apple "I can't use Keynote for
scientific presentations because it blurs my scientific graphics."

;-)

Ken
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42481 is a reply to message #42304] Wed, 09 February 2005 02:22 Go to previous message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
> I sent an example to my local Apple customer engineer. He can see
that
> Adobe Reader (for example) and Apple programs such as Preview and
> Keynote display images differently (both on OS X). He is sending a
> request up the chain to have the image smoothing turned off, or at
least
> made optional.

Thanks, Ken. I think someone at RSI may also bring it to Apple's
attention.
I'm sure that it will take a few nudges to get this noticed by Apple.

-John Mardaljevic
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42483 is a reply to message #42304] Tue, 08 February 2005 18:50 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1107864976.994712.187490@z14g2000cwz.googlegroups.com>,
jm@dmu.ac.uk wrote:

>> So you should contact the author/service team/who ever of the program
>
>> that causes the image operator to interpolate.
>
> I've logged it with Apple using their feedback form (the 'program' as
> such is
> the Aqua/OSX display system).
>
> -John
>

I sent an example to my local Apple customer engineer. He can see that
Adobe Reader (for example) and Apple programs such as Preview and
Keynote display images differently (both on OS X). He is sending a
request up the chain to have the image smoothing turned off, or at least
made optional.

Ken Bowman
Re: Blurred display of images in PDFs created from EPS on Mac OS X [message #42498 is a reply to message #42399] Tue, 08 February 2005 04:16 Go to previous message
jm is currently offline  jm
Messages: 32
Registered: April 2003
Member
> So you should contact the author/service team/who ever of the program

> that causes the image operator to interpolate.

I've logged it with Apple using their feedback form (the 'program' as
such is
the Aqua/OSX display system).

-John
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Dynamically resizing arrays
Next Topic: Large ascii file

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

Current Time: Wed Oct 08 15:21:29 PDT 2025

Total time taken to generate the page: 0.00530 seconds