Pylette
Pylette copied to clipboard
Feature - Add Image/bytes or IO support
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)
...