39
© PDF Tools AG – Premium PDF Technology
3-Heights™ PDF to Image Converter API, March 24, 2016 | 30/67
0.100000, 0.100000, 0.100000 ; K
0.243137, 0.247059, 0.584314 ; CM
0.000000, 0.658824, 0.349020 ; CY
0.066667, 0.176471, 0.215686 ; CK
0.929412, 0.196078, 0.215686 ; MY
0.215686, 0.101961, 0.141176 ; MK
0.200000, 0.196078, 0.125490 ; YK
0.266667, 0.266667, 0.274510 ; CMY
0.133333, 0.098039, 0.160784 ; CMK
0.074510, 0.180392, 0.133333 ; CYK
0.215686, 0.121569, 0.113725 ; MYK
0.125490, 0.121569, 0.121569 ; CMYK
5.9 How to Apply Isomorphic Stretching
If you have a given page size in pixel and would like to convert a PDF page to an image with exactly these given di
mensions, but the height-to-width ratio of the PDF is different, you can apply isomorphic stretching. This is achieved
by using different resolutions on the x and y axis. Assuming the Y-resolution is defined, the X-resolution is calculated
as shown in the code sample below:
Dim conv As New PDF2IMGOCXLib.Pdf2Img
conv.Open ...
conv.CreateImage ...
For Page = 1 To conv.PageCount
conv.XDPI = conv.YDPI * conv.PageHeight / conv.PageWidth
* conv.BitmapWidth / conv.BitmapHeight
conv.RenderPage Page
Next Page
conv.Close
conv.CloseImage
5.10 Dithering
Dithering is a common means used in images to simulate colors that are not available as actual colors. Its use is best
observed in image with a low color depth, where colors or shades of grey need to simulated with other colors (e.g.
only black/white pixels).
5.10.1 Remarks
1. All images below have quite a low resolution. As a result the effects of the different dithering types become
more obvious. The higher the resolution and the large the number of colors is, the higher the quality of the
image.
2. The rendering filter and current zoom level of the PDF viewing application may have an additional impact on
how the images below are displayed.