davemorrissey / subsampling-scale-image-view

Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.
Apache License 2.0
7.89k stars 1.2k forks source link

Half of the asset is grayscaled #52

Closed osrl closed 9 years ago

osrl commented 9 years ago

Half of the image is decoded grayscale. I'm on 5.0.1 (didn't test the rest). I'll upload the file here maybe you can reproduce the issue. I don't know if github process the image so I'll upload to dropbox too.

gsa_map

davemorrissey commented 9 years ago

This is very strange, I've never seen anything like it. For me, I get an entirely grey image when zoomed out, but when I zoom in I get coloured tiles that I can only describe as "1970s TV quality". Here's what I know so far:

Given an entirely different jpg decoder library also fails to handle this image, I can only suggest you re-save it from another graphics package.

osrl commented 9 years ago

Ok thank you. I'll try that. Of course this is a temporary solution but that fixes it for me.

laurencedawson commented 8 years ago

I've had this reported for a few more images in Sync:

https://i.imgur.com/X9f3KtD.jpg

Aside from re-encoding is there another workaround? Cheers

davemorrissey commented 8 years ago

The changes I made some time ago where the view will load the whole bitmap with BitmapFactory if it's small enough, avoiding BitmapRegionDecoder's bugs, was the last of my box of tricks. These bugs have been fixed in the Skia project but I expect Nougat will be the first version of Android to get the update and I don't know whether it will be backported - and even then many older phones won't get updated.

The last option was attempting to build and embed a Skia native library from the most recent code, but there would be one for each architecture and I think it was about 50Mb (I think we've discussed this before). That's far beyond my experience and I can't afford the time to learn it.

laurencedawson commented 8 years ago

Yeah I think at that point it gets pretty unreasonable to bloat apps by hundreds of megabytes...

Thanks for the reply though!