abstract_api.image_processing.strategies.fill module#

class abstract_api.image_processing.strategies.fill.Fill(background: str | None = None, **kwargs)[source]#

Bases: HeightMixin, WidthMixin, BaseStrategy

Resize image to fit the specified bounds while preserving aspect ratio.

The optional background parameter allows you to specify a color which will be used to fill the unused portions of the specified bounds. The default background color is black.

property background: str | None#

The color to be used to fill the unused portions.

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

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