New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for 1-bit Grayscale #2096
Comments
In the input image, we see (some fields redacted):
while in the output image (processed by
1/4 the number of pixels, yet a larger file size. |
A bunch of places in this library require that pixels are an integer number of bytes, which would break for However, that doesn't mean we cannot support |
Update on this: as of the 0.25 release, |
Thanks for the update! |
Thank you for this library, my company uses it for a variety of tasks.
I would like to be able write images that are encoded in 1-bit grayscale. I have such an image on-hand which unfortunately decodes into a
Luma8
underneath, effectively 8x-ing the filesize when rewritten.I discovered this by first noticing that my large image whose dimensions I had vastly shrunk and rewritten actually had increased its file size by 50% (12mb -> 18mb with default settings). I then inspected the input and output images with ImageMagick's
identify
tool to discover that the input image was 1-bit grayscale while the output's is 8-bit grayscale.Draft
DynamicImage
enum should gain a new variant:ImageLuma1
.ColorType
would need a new variant:L1
bool
would need to be given an impl ofPrimitive
.GrayImage
would need to be provided, but wrappingLuma<bool>
instead.Overall this should drastically reduce output image sizes for Grayscale images that don't want to use the full 8-bit channel depth.
The text was updated successfully, but these errors were encountered: