tlc.core.helpers.image_helper¶

Module Contents¶

Classes¶

Class

Description

ImageHelper

Helper class for image operations.

API¶

class ImageHelper¶

Helper class for image operations.

static get_exif_image_dimensions(
image_url: str | Path | Url,
) tuple[int, int]¶

Get the dimensions of an image, accounting for Exif orientation.

Parameters:

image_url – The URL of the image.

Returns:

The image dimensions (height, width).

static get_exif_image_dimensions_from_bytes(
image_bytes: bytes,
) tuple[int, int]¶

Get the dimensions of an image from bytes, accounting for Exif orientation.

Parameters:

image_bytes – The bytes of the image.

Returns:

The image dimensions (height, width).