13.1Class Image

Class representing a QR code image.

Class Image( version, width, data, maker )
version The version of this QR image.
width The width of this QR image.
data Raw binary data.
maker The maker that built this Image (used for configuration).

Note: This class should not be instanced directly; it should be created trhough the Maker methods.

This class contains the data that can be rendered to an output image.

Methods
jpgSaves the image on the given open stream as a JPG image.
pngSaves the image on the given open stream as a PNG image.
saveJpgSaves the image on the given file name as a JPG image.
savePngSaves the image on the given file name as a PNG image.

Methods

jpg

Saves the image on the given open stream as a JPG image.

jpg( outStream, [size],[margin] )
outStream The stream where the image must be saved.
size Size of dots, in pixels.
margin Size of the white margin around the image, in pixels.
Raise
IoError on i/o error.

png

Saves the image on the given open stream as a PNG image.

png( outStream, [size],[margin] )
outStream The stream where the image must be saved.
size Size of dots, in pixels.
margin Size of the white margin around the image, in pixels.
Raise
IoError on i/o error.

saveJpg

Saves the image on the given file name as a JPG image.

saveJpg( fname, [size],[margin] )
fname The name/uri of the file where to save the image.
size Size of dots, in pixels.
margin Size of the white margin around the image, in pixels.
Raise
IoError i/o on error.

savePng

Saves the image on the given file name as a PNG image.

savePng( fname, [size],[margin] )
fname The name/uri of the file where to save the image.
size Size of dots, in pixels.
margin Size of the white margin around the image, in pixels.
Raise
IoError i/o on error.
Made with http://www.falconpl.org