package j5;

import android.graphics.Bitmap;

/* JADX INFO: loaded from: classes.dex */
public abstract class e implements a5.o {
    @Override // a5.o
    public final com.bumptech.glide.load.engine.e0 a(com.bumptech.glide.k kVar, com.bumptech.glide.load.engine.e0 e0Var, int i10, int i11) {
        if (!t5.p.g(i10, i11)) {
            throw new IllegalArgumentException("Cannot apply transformation on width: " + i10 + " or height: " + i11 + " less than or equal to zero and not Target.SIZE_ORIGINAL");
        }
        c5.e eVar = com.bumptech.glide.c.a(kVar).f5552a;
        Bitmap bitmap = (Bitmap) e0Var.get();
        if (i10 == Integer.MIN_VALUE) {
            i10 = bitmap.getWidth();
        }
        if (i11 == Integer.MIN_VALUE) {
            i11 = bitmap.getHeight();
        }
        Bitmap bitmapB = b(eVar, bitmap, i10, i11);
        return bitmap.equals(bitmapB) ? e0Var : d.obtain(bitmapB, eVar);
    }

    public abstract Bitmap b(c5.e eVar, Bitmap bitmap, int i10, int i11);
}
