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 |
jpg | Saves the image on the given open stream as a JPG image. |
png | Saves the image on the given open stream as a PNG image. |
saveJpg | Saves the image on the given file name as a JPG image. |
savePng | Saves the image on the given file name as a PNG image. |
Methods
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 |
|
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 |
|
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 |
|
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 |
|