Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
media/thumbnailer: Better quality for 1-bit / 8-bit color palette images #2142
Pillow will use nearest neighbour as the resampling algorithm if the
Note: I haven't actually tested this but setting up a synapse just to do so is more effort than I'm willing at this particular moment.
Pillow will use nearest neighbour as the resampling algorithm if the source image is either 1-bit or a color palette using 8 bits. If we convert to RGB before scaling, we'll probably get a better result.
lgtm, but please do test it first. setting up a synapse on OSX is absolutely trivial and very worthwhile - in your git checkout, just:
i'd be surprised if copy-pasting that didn't give you a working homeserver on port 8008 ready to test against.
NegativeMjark left a comment
LGTM, but it might be nice to test uploading a 1-bit image with a unit test or a sytest. (I'm happy to take you at your word wrt image quality, but it would be nice to have some way to check it doesn't crash)