Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
images [2016/02/22 17:19] christian [To be done] |
images [2016/09/24 08:15] (current) dokuadmin ↷ Links adapted because of a move operation |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Images ====== | ====== Images ====== | ||
- | Bitmapped images are described in chapter 8.9 //Images// on page 203 of the {{pdf32000_2008.pdf# | + | Bitmapped images are described in chapter 8.9 //Images// on page 203 of the {{pdf:pdf32000_2008.pdf_page_211|PDF specification}} on quite readable 14 pages. |
+ | |||
+ | The implementation is in package '' | ||
===== Usage ===== | ===== Usage ===== | ||
Line 23: | Line 25: | ||
renderer paintXObject: | renderer paintXObject: | ||
</ | </ | ||
+ | |||
+ | {{pdf: | ||
+ | |||
+ | {{pdf: | ||
===== Object Models ===== | ===== Object Models ===== | ||
Line 73: | Line 79: | ||
</ | </ | ||
- | In PDF images are defined by the number of bits per color component (1, 2, 4, 8 or 16 bit). The colorspace defines the number of components and their layout for a pixel. Any colorspace permitted in PDF can be used (see [[Colors]]). For images converted from Smalltalk, only ''/ | + | In PDF images are defined by the number of bits per color component (1, 2, 4, 8 or 16 bit). The colorspace defines the number of components and their layout for a pixel. Any colorspace permitted in PDF can be used (see [[:colors]]). For images converted from Smalltalk, only ''/ |
A '' | A '' | ||
Line 95: | Line 101: | ||
The conversion methods are implemented in the '' | The conversion methods are implemented in the '' | ||
+ | |||
+ | {{ : | ||
The default behavior is to transfer the pixels one by one. For each pixel, the bits are read from the specified location in the source image bytes and interpreted as color ('' | The default behavior is to transfer the pixels one by one. For each pixel, the bits are read from the specified location in the source image bytes and interpreted as color ('' | ||
Line 114: | Line 122: | ||
===== To be done ===== | ===== To be done ===== | ||
- | Although all Smalltalk images can be used for PDF, not all PDF images can be transformed to Smalltalk images. For one, several {{pdf32000_2008.pdf#page=22|filters}} specific to images are not implemented: | + | ==== Filter ==== |
+ | |||
+ | Although all Smalltalk images can be used for PDF, not all PDF images can be transformed to Smalltalk images. For one, several {{pdf:pdf32000_2008.pdf_page_22|filters}} specific to images are not implemented: | ||
* **RunLengthDecode** 8 bit monochrome images | * **RunLengthDecode** 8 bit monochrome images | ||
* **CCITTFaxDecode** CCITT encoded 1 bit monochrome images | * **CCITTFaxDecode** CCITT encoded 1 bit monochrome images | ||
Line 124: | Line 134: | ||
Secondly, PDF can have images in other colorspaces than RGB or Grayscale; most notable is ''/ | Secondly, PDF can have images in other colorspaces than RGB or Grayscale; most notable is ''/ | ||
+ | |||
+ | ==== Inlined Images ==== | ||
+ | |||
+ | Images in PDF can be inlined in the /Contents stream instead of storing them in the /Resources as /XObject. Only a subset of legal PDF images can be inlined and it is discouraged for large images. Even though, I have not seen such image in a real-world PDF, this feature should be implemented for completeness. |