DECIMER/config.py
def remove_transparent(image_path: str):
    """
    Removes the transparent layer from a PNG image with an alpha channel
    ___
    image_path (str): path of input image
    ___
    Output: PIL.Image
    """
    png = Image.open(image_path).convert("RGBA")
    background = Image.new("RGBA", png.size, (255, 255, 255))

    alpha_composite = Image.alpha_composite(background, png)

    return alpha_composite

    Removes the transparent layer from a PNG image with an alpha channel
    ___
    image_path (str): path of input image
    ___
    Output: PIL.Image
    
Removes the transparent layer from a PNG image with an alpha channel
image_path (str): path of input image
Output: PIL.Image
Removes the transparent layer from a PNG image with an alpha channel image_path ( str ) : path of input image Output : PIL . Image
def remove_transparent(image_path: str):
    png = Image.open(image_path).convert("RGBA")
    background = Image.new("RGBA", png.size, (255, 255, 255))
    alpha_composite = Image.alpha_composite(background, png)
    return alpha_composite
def remove_transparent ( image_path : str ) : png = Image . open ( image_path ) . convert ( "RGBA" ) background = Image . new ( "RGBA" , png . size , ( 255 , 255 , 255 ) ) alpha_composite = Image . alpha_composite ( background , png ) return alpha_composite
Removes the transparent layer from a PNG image with an alpha channel
___
image_path (str): path of input image
___
Output: PIL.Image
Removes the transparent layer from a PNG image with an alpha channel ___ image_path ( str ) : path of input image ___ Output : PIL . Image
"""
    Removes the transparent layer from a PNG image with an alpha channel
    ___
    image_path (str): path of input image
    ___
    Output: PIL.Image
    """
image_path
str