Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
images [2016/02/22 17:19] christian [To be done] |
images [2016/02/29 11:31] christian [Usage] |
||
---|---|---|---|
Line 2: | Line 2: | ||
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 {{pdf32000_2008.pdf# | ||
+ | |||
+ | The implementation is in package '' | ||
===== Usage ===== | ===== Usage ===== | ||
Line 23: | Line 25: | ||
renderer paintXObject: | renderer paintXObject: | ||
</ | </ | ||
+ | |||
+ | {{demo20_ImagesUsage.pdf}} shows the result with an example image. | ||
===== Object Models ===== | ===== Object Models ===== | ||
Line 113: | Line 117: | ||
When converting such image optimized by converting the palette and using the same indexes for the pixels allowing direct reuse of the image bytes, the /Indexed colorspace may contain several entries for the same color. Converting such an ImageXObject back to Smalltalk will not recreate the least significant 5 bits leading to slightly different colors as in the original. But for 8 bit RGB usage, it will not make any difference. Although this does not feel proper, it will not make much difference in practice. But the speed up of the optimization is worth it. | When converting such image optimized by converting the palette and using the same indexes for the pixels allowing direct reuse of the image bytes, the /Indexed colorspace may contain several entries for the same color. Converting such an ImageXObject back to Smalltalk will not recreate the least significant 5 bits leading to slightly different colors as in the original. But for 8 bit RGB usage, it will not make any difference. Although this does not feel proper, it will not make much difference in practice. But the speed up of the optimization is worth it. | ||
===== To be done ===== | ===== To be done ===== | ||
+ | |||
+ | ==== Filter ==== | ||
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# | 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# | ||
Line 124: | Line 130: | ||
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. |