skia: fix a regression in decoding DNG

Since PIEX can now return an uncompressed RGB thumbnail, check the type
of the image before treating it as a JPEG.

this commit was already reviewed and cherry-picked from skia project,
https://codereview.chromium.org/1883783002/

Bug: 28119810, Bug: 26894354
Change-Id: Ib30d6f73518c77034b23573ac9ac018df2efac66
2 files changed