SpartanJ / ImgurViewer

ImgurViewer is a little image viewer to open image links from external applications in the fastest way possible.
112 stars 7 forks source link

Fix color banding #53

Closed RedMser closed 1 year ago

RedMser commented 1 year ago

Fix #27

This will cause increased memory usage, but also improves color accuracy. Maybe it's desired to turn this into a setting, but I don't know how to do this.

See this page for more details: https://github.com/davemorrissey/subsampling-scale-image-view/wiki/02.-Displaying-images#important-notes

This image can be used for testing: https://i.imgur.com/v0NcJ4D.png

RedMser commented 1 year ago

Actually this doesn't seem to fully fix it, will try to see what's wrong...

SpartanJ commented 1 year ago

You can get the same result by calling:

SubsamplingScaleImageView.setPreferredBitmapConfig( Bitmap.Config.ARGB_8888 );

I'll just do that for the moment. Where doesn't seem fully fixed? Should be enough for static images.

RedMser commented 1 year ago

Did not see that method, seems like a nicer fix! :+1:

I'll retry with your committed fix and see if I can find any pictures where it still had the color issues.

RedMser commented 1 year ago

@SpartanJ It seems the issue happened due to using an internal image viewer and not the ImgurViewer app. This fix is totally fine! :)