Is Apple Quartz PDF antialiasing doing the right thing?

アップルのbitmap antialiasing変じゃないですか?
Aug. 27, 2010

Summary in Japanese:
MacOS XからiOSデバイスであるiPhoneからiPadまで、PDFの表示は、ほとんど全てのそれを必要とするアプリケーションでサポートされています。 ところが、これをシステムレベルでサポートしているQuartz 2Dというモジュールのbitmapの扱いに、どうもおかしなところがあります。 前から気にはなっていたのですが、iPadでPDF形式の論文が読めるようになってから、何とかして欲しいとおもって、このバグ(Appleによる、おかしなPDFの仕様の解釈?)を記述しておきます。

AdobeとAppleのPDF renderingの違いを例で示します。私が共著者の論文、Sasaki KS, Ohzawa I. (2007)図2C のAdobe Reader (Adobe Acrobat)[]とMacOS X 付属のPreview[]による同じ部分の拡大表示です。少なくともこの件に関しては、Appleのbitmapへのantialiasingのかけかたは間違っていると思います。以下詳細は英語で。

Nearly all MacOS X applications (except for Adobe products) and all iPhone and iPad apps rely on Quartz 2D for rendering PDF documents. From Preview, Keynote, Safari, Papers, iBook... And the way these applications render bitmap data with antialiasing is wrong.

I sort of knew this problem for several years, but now that I am regularly reading scientific papers in PDF format on my iPad where there is no AdobeReader or plugin, it started bother me a lot. Images below are bitmaps from one of our papers (Sasaki KS, Ohzawa I. (2007)), as displayed by Adobe Reader (Adobe Acrobat) [left], and by MacOS X Preview.app [right]. The rendering by Preview.app is overly and unnecessarily blurred.

Apple usually does the right thing, but in this case, I believe Adobe is right and Apple is wrong.

My guess of what is going on is that Apple's Quartz does bitmap antialiasing to the bitmap representation itself perhaps assuming a certain DPI (dots per inch) value. I think this is wrong. The DPI value, that may or may not be present in the original bitmap files or pasteboard data, should be irrelevant once those bitmaps are embedded in a larger figure. Antialiasing operation should happen at really the last stage, when mapping the representation to pixels of the acutal display device. And it is not a matter of turning the antialiasing ON or OFF. It should be ON generally, as things are now. What I am saying is that Apple seems to be doing it at the wrong stage of the display mechanism.

This part of MacOS X comes from NeXTSTEP, which I believe is the first OS with system-wide resolution-independent display imaging model in their Display PostScript, and now this is inherited in Quartz in MacOS X as its PDF-like imaging model. If my memory serves me right, I think NeXTSTEP did the right thing. I hope Apple does something quickly to fix this.

I have some additional sample files here as a ZIP file.

 

Adobe Acrobat display  MacOS Preview.app

 

Reference:

Sasaki KS, Ohzawa I. (2007) Internal spatial organization of receptive fields of complex cells in the early visual cortex. J Neurophysiol. 98(3):1194-212, PMID: 17652422

 

(Updated: August 27, 2010)