User Tools

Site Tools


pdf:images

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pdf:images [2016/02/29 11:35] – [Usage] christianpdf:images [2016/03/02 15:19] (current) – [Implementation] christian
Line 101: Line 101:
  
 The conversion methods are implemented in the ''Graphics.Image'' hierarchy. To convert a Smalltalk image to PDF with ''asPDF'', the method ''writePixelsTo: anImageXObject'' transfers the actual pixels from the Smalltalk to the PDF image. The other direction uses the method ''readPixelsFrom: anImageXObject'' which transfers the PDF pixels to the Smalltalk image. The conversion methods are implemented in the ''Graphics.Image'' hierarchy. To convert a Smalltalk image to PDF with ''asPDF'', the method ''writePixelsTo: anImageXObject'' transfers the actual pixels from the Smalltalk to the PDF image. The other direction uses the method ''readPixelsFrom: anImageXObject'' which transfers the PDF pixels to the Smalltalk image.
 +
 +{{ :pdf:bitfiddling200x266.png?nolink|Work sketch for bit fiddling}}
  
 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 (''valueAtPoint:''). This color is then converted to the target bits which are written to the specified location in the target image bytes (''valueAtPoint:put:''). While these two pixel accessors are correct and well tested for any kind of image, they are very slow. 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 (''valueAtPoint:''). This color is then converted to the target bits which are written to the specified location in the target image bytes (''valueAtPoint:put:''). While these two pixel accessors are correct and well tested for any kind of image, they are very slow.
/var/www/virtual/code4hl/html/dokuwiki/data/pages/pdf/images.txt · Last modified: 2016/03/02 15:19 by christian