facebook/fresco

Color spaces in Android O are not handled properly by some features

Open

#1871 opened on Aug 20, 2017

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Java (17,072 stars) (3,750 forks)batch import
enhancementgood first issuehelp wanted

Description

Description

O is the first Android release that introduces a proper color management system into the OS and platform framework. This addition doesn't require any changes for simple decoding and displaying of Bitmaps, but some of Fresco's more advanced features seem to drop ColorSpace information.

I went through the Fresco Showcase sample app modified as described below and found bad color reproduction in these parts of the app:

  • Drawee -> Rotation
  • Image Pipeline -> Post-Processor
  • Image Pipeline -> Resizing

Things that I've not tested yet:

  • Progressive JPEGs,
  • GIFs
  • WebPs
  • SVGs
  • Images from Data URIs

Reproduction

  • Check out 3194ad2
  • Add whacked_jpg and whacked_png to res/drawable-nodpi in the Showcase module
    • I created these files from this image by using the "Match to Profile" feature of the macOS ColorSync Utility app with the popular WhackedRGB.icc and intent set to "Automatic".
  • Replace jpg urls with "res:///" + R.drawable.whacked_jpg and png urls with "res:///" + R.drawable.whacked_png in ImageUriProvider
  • Play around with the samples

Additional Information

  • Fresco version: 3194ad2
  • Platform version: Android O (rev. 5 of the emulator image)

Contributor guide