Pylette icon indicating copy to clipboard operation
Pylette copied to clipboard

Feature - Add Image/bytes or IO support

Open jmillandev opened this issue 1 year ago • 0 comments

On my app I already have a image in memory. To use extract_colors I need to save it on a temp file, will be great if I can pass the bytes just.

Something like this:

class ColorPaletteExtractor(Protocol):
    async def __call__(self, asset: bytes) -> List[str]:
        palette = extract_colors(asset, palette_size=10, resize=True)
        ...

jmillandev avatar Feb 17 '24 18:02 jmillandev