-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
What did you do?
I have a bunch of gray-scale datasets what I would like to compress using the AVIF format to reduce the amount of data sent. Currently I'm able to store my grayscale data in an RGB AVIF file, but I want to use the grayscale compression ability of AVIF to hopefully get an even better compression ratio and not have to discard a bunch of extra data when loading the data file.
What did you expect to happen?
For the AVIF encoder/decoder to support gray-scale images.
What actually happened?
The AVIF encoder/decoder only supports RGB images.
What are your OS, Python and Pillow versions?
- OS: Windows 10
- Python: 3.12.10
- Pillow: 12.1.1
im = PIL.Image.fromarray(img_data.astype(np.uint8)) # shape (nx, ny, 1)
im.save("image.avif")
# This saves an RGB avif file instead of a grayscale file.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels