package com.bytedance.sdk.openadsdk.wey.fm;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import com.bytedance.sdk.component.utils.wey;
import com.bytedance.sdk.component.utils.yz;

/* JADX INFO: loaded from: classes2.dex */
public class ro {
    int fm;
    private Bitmap jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private byte[] f7586lb;
    private Drawable ro;
    private Bitmap yz;

    public ro(Drawable drawable, int i10) {
        this.f7586lb = null;
        this.yz = null;
        this.jnr = null;
        this.ro = drawable;
        this.fm = i10;
    }

    public Bitmap fm() {
        return this.yz;
    }

    public boolean jnr() {
        if (this.yz != null || this.ro != null) {
            return true;
        }
        byte[] bArr = this.f7586lb;
        return bArr != null && bArr.length > 0;
    }

    public byte[] lb() {
        try {
            if (this.f7586lb == null) {
                this.f7586lb = yz.fm(this.yz);
            }
        } catch (OutOfMemoryError e10) {
            wey.lb("GifRequestResult", e10.getMessage());
        }
        return this.f7586lb;
    }

    public Bitmap ro() {
        return this.jnr;
    }

    public Drawable yz() {
        return this.ro;
    }

    public ro(byte[] bArr, int i10) {
        this.ro = null;
        this.yz = null;
        this.jnr = null;
        this.f7586lb = bArr;
        this.fm = i10;
    }

    public ro(Bitmap bitmap, Bitmap bitmap2, int i10) {
        this.ro = null;
        this.f7586lb = null;
        this.jnr = bitmap2;
        this.yz = bitmap;
        this.fm = i10;
    }
}
