Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac1928b7 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Respect the EXIF orientation in ImageDecoder

Bug: 63909536
Test: CTS: Ia50449b9b2e3c965bbd7fb95901b239f77990344
Change-Id: I154c0e5c07968b108df5be279860f0c35441f5cf
parent a5014f29
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;