PyX — Examples: Bitmaps

Although PyX creates scaleable vector graphics, you can embed bitmap data into your output by means of the bitmap module.

Overview for this section

minimal.png

Store bitmap data using PyX

While the main purpose of PyX is to create vector graphics, it is also possible to store bitmap data in the PyX output. In this example, we show how to create a simple data structure containing the bitmap data more ...

pil.png

Using image instances from the PIL

You can use image instances from the Python Image Library to create bitmaps. You then have an easy access to all the bitmap formats available in PIL, you may also use PIL features to create/load/modify bitmaps etc. more ...

jpeg.png

Insert JPEG images without and with recompression

With the bitmap.jpegimage class, PyX allows you to directly insert a JPEG image into a canvas. It extracts the compressed JPEG data and makes the data available to a PyX bitmap without recompression (i.e. without loss of quality). more ...