@TargetApi(Build.VERSION_CODES.O)
    static void setColorSpace(BitmapFactory.Options options, @Nullable ColorSpace colorSpace) {
      options.inPreferredColorSpace =
          colorSpace == null ? ColorSpace.get(ColorSpace.Named.SRGB) : colorSpace;
    }
Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap

<p>Adds a JFIF End-Of-Image marker if needed before decoding.

@param bytesRef the byte buffer that contains the encoded bytes
@param length the number of encoded bytes in the buffer
@param options the options passed to the BitmapFactory
@return
imagepipeline-native/src/main/java/com/facebook/imagepipeline/nativecode/DalvikPurgeableDecoder.java