Closed malyvsen closed 2 years ago
Using only ContrastEnhancer seems to work better for screenshots (which do have large white areas which we don't want to gray out). Adding QuantileEnhancer with a positive arguments helps screenshots even more.
OH NO i didn't see this until now 💔
ImageToPrintCommands
now accepts an array ofIEnhancer
- image filters to apply before dithering. I implemented two enhancers:HDREnhancer
- adjusts local brightness to avoid bright areas becoming entirely white (and vice versa for dark ones)ContrastEnhancer
- does what it says on the tin :)QuantileEnhancer
- makes sure that the the distribution of brightness levels is uniform across the imageI'd go for calling
ImageToPrintCommands
withenhancers = {new QuantileEnhancer(0.5f), new HDREnhancer(0.1f, 8), new ContrastEnhancer(0.25f, 16)}
.Also! I didn't test this on the device, just made sure that pictures look nice after some enhancements and dithering.