Skip to content
Snippets Groups Projects
Commit 38dc6c58 authored by Driss KHALIL's avatar Driss KHALIL
Browse files

[transforms.py] Add documentation to function _expand2square

parent ab2f960a
No related branches found
No related tags found
1 merge request!31[Rebase] rebase merged request
Pipeline #53061 passed
......@@ -284,6 +284,13 @@ def _expand2square(pil_img, background_color):
A tuple to represent the color of the background of the image in order to pad with the same color.
If the image is an RGB image background_color should be a tuple of size 3 , if it's a grayscale image the variable can be represented with an integer.
Returns
-------
image : PIL.Image.Image
A new image with height equal to width
"""
width, height = pil_img.size
if width == height:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment