geotribu_cli.utils.check_image_size module¶
Check image size using pure Python <https://github.com/shibukawa/imagesize_py>.
Author: Julien Moura (https://github.com/guts)
- geotribu_cli.utils.check_image_size.check_image_dimensions(image_filepath, min_width=500, max_width=600, min_height=250, max_height=350, allowed_images_extensions=('.jpg', '.jpeg', '.png', '.svg'))¶
Check input image dimensions against passed limits.
- Paramètres:
- Return bool:
True if image dimensions are inferior
- Type renvoyé:
- geotribu_cli.utils.check_image_size.get_image_dimensions_by_url(url)¶
Get image dimensions as a tuple (width,height) of an image at an URL. Return None in case of error or no data.
- geotribu_cli.utils.check_image_size.get_image_size(image_filepath)¶
Get image dimensions as a tuple (width,height). Return None in case of error.
- geotribu_cli.utils.check_image_size.get_svg_size(image_filepath)¶
Extract SVG width and height from a SVG file and convert them into integers. Relevant and working only if the file root has width and height attributes.