components.io.imagefilepil
Read a still image file using Python Imaging Library. |
|
Write a still image file using Python Imaging Library. |
- class ImageFileReaderPIL(config={}, **kwds)[source]
Bases:
ComponentRead a still image file using Python Imaging Library.
Reads an image file using
PIL.Image.open. This function cannot handle 16-bit data, so you may prefer to useImageFileReaderCVinstead.Config
pathstr
Path name of file to be read.
- class ImageFileWriterPIL(config={}, **kwds)[source]
Bases:
TransformerWrite a still image file using Python Imaging Library.
This component saves the first frame it receives to file using
PIL.Image.Image.save.See the PIL documentation for details of the available formats and options.
The
optionsconfiguration should be a comma separated list of colon separated names and values, for example a JPEG file might have these options:'quality': 95, 'progressive': True.The
set_thumbnailoption allows you to store a DCF standard 160 x 120 (or 120 x 160) thumbnail in the Exif metadata.PIL cannot write 16-bit data, so you may prefer to use
ImageFileWriterCVinstead.Config
pathstr
Path name of file to be created.
formatstr
Over-ride the file format. This is normally derived from the
pathextension.optionsstr
A string of
PIL.Image.Image.saveoptions.set_thumbnailbool
Create and add an Exif thumbnail.
Comments or questions? Please email jim@jim-easterbrook.me.uk.