You can now pass a filename, a URL, bytes, an array, etc directly into the image-argument to the extract_color function. You no longer have to remember to use image_url, image_bytes, etc.
Example:
These all work:
palette = extract_colors("https://your-image-url.com/test-image.png", ...) # From an URL
palette = extract_colors(open("/image/as/bytes", "rb").read(), ...). # Image as bytes
palette = extract_colors(pathlib.Path("/path/to/image.png"), ...) # any PathLike
Motivation
You can now pass a filename, a URL, bytes, an array, etc directly into the
image
-argument to theextract_color
function. You no longer have to remember to useimage_url
,image_bytes
, etc.Example:
These all work: