module helpers.image_helper

Short summary

module ensae_teaching_cs.helpers.image_helper

image helpers

source on GitHub

Functions

function truncated documentation
collate_images Collates all images horizontally in one image (if not None –> image name).
convert_image Converts an image or a list of images into a different format.

Documentation

image helpers

source on GitHub

ensae_teaching_cs.helpers.image_helper.collate_images(imgs, final=None)[source]

Collates all images horizontally in one image (if not None –> image name).

Paramètres:
  • imgs – list of image files
  • final – final image (or None not to save)
Renvoie:

final image (PIL object)

It uses the module Pillow.

source on GitHub

ensae_teaching_cs.helpers.image_helper.convert_image(imgs, ext, dest=None, fLOG=None)[source]

Converts an image or a list of images into a different format.

Paramètres:
  • imgs – list of images (filenames)
  • dest – destination folder, if None, the image is saved beside the orginal one
  • ext – new format
  • fLOG – logging function
Renvoie:

list of written images

source on GitHub