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:
Component
Read 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 useImageFileReaderCV
instead.Config
path
str
Path name of file to be read.
- class ImageFileWriterPIL(config={}, **kwds)[source]
Bases:
Transformer
Write 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
options
configuration 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_thumbnail
option 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
ImageFileWriterCV
instead.Config
path
str
Path name of file to be created.
format
str
Over-ride the file format. This is normally derived from the
path
extension.options
str
A string of
PIL.Image.Image.save
options.set_thumbnail
bool
Create and add an Exif thumbnail.
Comments or questions? Please email jim@jim-easterbrook.me.uk.