Fuzzr
Fuzzr copied to clipboard
Minor image upload bug
I happened to be testing an upload with a white image that had a transparent background. At least in light mode, this obviously was invisible. Not sure a possible solution at the moment, and it's a very niche case, but I want to open this as a reminder to myself to sort it out at some point
Not sure of a good way to deal with this. Perhaps a way to toggle night mode, but how would the user know what they can't see? A checkerboard is also not ideal, since there's sometimes value to having transparency in images. Can you think of any, @kn0wmad ?
There is one possible way to do this, however:
- Draw a checkerboard background (generated, not as an image, unless we implement unscaled tiling, which at that point, just draw it via an Iced Canvas).
- Only make the checkerboard background button appear when there's an image with a transparency channel (the image crate should help with this)
- Scan through any image to be rendered to tell if there are only two colors: alpha, and also, either white or black.
- If there's a two-color image with alpha that is the same color as our background, then the checkerboard button would be enabled automatically, to better provide information to the user that they wouldn't have known to see before.
Cool, sounds good. Obviously not a pressing feature, but will investigate this.
Honestly, I don't mind if this issue is solved in this way, it's a really elegant solution that no other browser or viewer I've seen other than image editing software that's simpler to use than GIMP or PS has solved. Like, seriously, most of them probably "solve" it by having off-white or off-black be the background color.
For small, quality of life features like this, the approach I suggested poses few technical challenges, would stress the implementer's knowledge of Rust so that good knowledge is gained, and it could potentially someday impress an early adopter with an eye for this.
@kn0wmad What I'm saying is, go to town, my man. I'm not gonna say no.
Okay, what I was saying is "I will do this, after some in progress stuff gets done."