File size: 203 Bytes
50ba6d4
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from pathlib import Path

from PIL import Image


def load_rgb_image(path: str | Path) -> Image.Image:
    """Load an image from disk and convert it to RGB."""
    return Image.open(path).convert("RGB")