madam.image module¶
-
class
madam.image.
FlipOrientation
[source]¶ Bases:
enum.Enum
Represents an axis for image flip operations.
-
HORIZONTAL
= 0¶ Horizontal axis
-
VERTICAL
= 1¶ Vertical axis
-
-
class
madam.image.
PillowProcessor
[source]¶ Bases:
madam.core.Processor
Represents a processor that uses Pillow as a backend.
-
auto_orient
(asset)[source]¶ Creates a new asset whose essence is rotated according to the Exif orientation.
Parameters: asset – Asset with Exif metadata Returns: Asset with rotated essence
-
convert
(asset, mime_type)[source]¶ Creates a new asset of the specified MIME type from the essence of the specified asset.
Parameters: - asset – Asset whose contents will be converted
- mime_type – Target MIME type
Returns: New asset with converted essence
-
flip
(asset, orientation)[source]¶ Creates a new asset whose essence is flipped according the specified orientation.
Parameters: - asset – Asset whose essence is to be flipped
- orientation – axis of the flip operation
Returns: Asset with flipped essence
-
-
class
madam.image.
ResizeMode
[source]¶ Bases:
enum.Enum
Represents a behavior for image resize operations.
-
EXACT
= 0¶ Resized image exactly matches the specified dimensions
-
FILL
= 2¶ Resized image is resized to completely fill the specified dimensions
-
FIT
= 1¶ Resized image is resized to fit completely into the specified dimensions
-