def _get_image_encoder(self, camera_port, output_port, format, resize, **options):
    "\n        Construct an image encoder for the requested parameters.\n\n        This method is called by :meth:`capture` and :meth:`capture_continuous`\n        to construct an image encoder. The *camera_port* parameter gives the\n        MMAL camera port that should be enabled for capture by the encoder. The\n        *output_port* parameter gives the MMAL port that the encoder should\n        read output from (this may be the same as the camera port, but may be\n        different if other component(s) like a splitter have been placed in the\n        pipeline). The *format* parameter indicates the image format and will\n        be one of:\n\n        * ``'jpeg'``\n        * ``'png'``\n        * ``'gif'``\n        * ``'bmp'``\n        * ``'yuv'``\n        * ``'rgb'``\n        * ``'rgba'``\n        * ``'bgr'``\n        * ``'bgra'``\n\n        The *resize* parameter indicates the size that the encoder should\n        resize the output to (presumably by including a resizer in the\n        pipeline). Finally, *options* includes extra keyword arguments that\n        should be passed verbatim to the encoder.\n        "
    encoder_class = (PiRawOneImageEncoder if (format in self.RAW_FORMATS) else PiCookedOneImageEncoder)
    return encoder_class(self, camera_port, output_port, format, resize, **options)
Construct an image encoder for the requested parameters.

This method is called by :meth:`capture` and :meth:`capture_continuous`
to construct an image encoder. The *camera_port* parameter gives the
MMAL camera port that should be enabled for capture by the encoder. The
*output_port* parameter gives the MMAL port that the encoder should
read output from (this may be the same as the camera port, but may be
different if other component(s) like a splitter have been placed in the
pipeline). The *format* parameter indicates the image format and will
be one of:

* ``'jpeg'``
* ``'png'``
* ``'gif'``
* ``'bmp'``
* ``'yuv'``
* ``'rgb'``
* ``'rgba'``
* ``'bgr'``
* ``'bgra'``

The *resize* parameter indicates the size that the encoder should
resize the output to (presumably by including a resizer in the
pipeline). Finally, *options* includes extra keyword arguments that
should be passed verbatim to the encoder.
def _get_image_encoder(self, camera_port, output_port, format, resize, **options):
    "\n        Construct an image encoder for the requested parameters.\n\n        This method is called by :meth:`capture` and :meth:`capture_continuous`\n        to construct an image encoder. The *camera_port* parameter gives the\n        MMAL camera port that should be enabled for capture by the encoder. The\n        *output_port* parameter gives the MMAL port that the encoder should\n        read output from (this may be the same as the camera port, but may be\n        different if other component(s) like a splitter have been placed in the\n        pipeline). The *format* parameter indicates the image format and will\n        be one of:\n\n        * ``'jpeg'``\n        * ``'png'``\n        * ``'gif'``\n        * ``'bmp'``\n        * ``'yuv'``\n        * ``'rgb'``\n        * ``'rgba'``\n        * ``'bgr'``\n        * ``'bgra'``\n\n        The *resize* parameter indicates the size that the encoder should\n        resize the output to (presumably by including a resizer in the\n        pipeline). Finally, *options* includes extra keyword arguments that\n        should be passed verbatim to the encoder.\n        "
    encoder_class = (PiRawOneImageEncoder if (format in self.RAW_FORMATS) else PiCookedOneImageEncoder)
    return encoder_class(self, camera_port, output_port, format, resize, **options)