Merge "Respect the EXIF orientation in ImageDecoder"

This commit is contained in:
Leon Scroggins
2018-01-30 20:56:51 +00:00
committed by Android (Google) Code Review

View File

@@ -74,7 +74,8 @@ static jobject native_create(JNIEnv* env, std::unique_ptr<SkStream> stream) {
// FIXME: Avoid parsing the whole image?
const bool animated = codec->getFrameCount() > 1;
decoder->mCodec = SkAndroidCodec::MakeFromCodec(std::move(codec));
decoder->mCodec = SkAndroidCodec::MakeFromCodec(std::move(codec),
SkAndroidCodec::ExifOrientationBehavior::kRespect);
if (!decoder->mCodec.get()) {
doThrowIOE(env, "Could not create AndroidCodec");
return nullptr;