colorize_img()
Colorizes black and white images or re-colors existing images. Optionally adds a caption.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
img |
Image
|
The image to be colorized. |
required |
max_width |
int
|
The maximum width of the output image, defaults to 1024. |
1024
|
max_height |
int
|
The maximum height of the output image, defaults to 1024. |
1024
|
caption |
str
|
A caption for the image. If None, a caption is generated and modified. |
None
|
Returns:
Name | Type | Description |
---|---|---|
Image |
The colorized version of the input image. |