abstract_api.image_processing.strategies.square module#

class abstract_api.image_processing.strategies.square.Square(size: int)[source]#

Bases: BaseStrategy

Crop image by its shorter dimension to make it a square.

Image is resized after cropping to the specified size.

json() dict[str, int | str][source]#

Returns a dict with strategy attributes to be used with requests.

property size: int#

Size to resize the cropped image to.