package z1; import android.content.Context; import android.graphics.Bitmap; /* loaded from: classes.dex */ public abstract class g implements q1.l { @Override // q1.l public final s1.v b(Context context, s1.v vVar, int i10, int i11) { if (!m2.k.s(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"); } t1.d f10 = com.bumptech.glide.b.c(context).f(); Bitmap bitmap = (Bitmap) vVar.get(); if (i10 == Integer.MIN_VALUE) { i10 = bitmap.getWidth(); } if (i11 == Integer.MIN_VALUE) { i11 = bitmap.getHeight(); } Bitmap c10 = c(f10, bitmap, i10, i11); return bitmap.equals(c10) ? vVar : f.e(c10, f10); } protected abstract Bitmap c(t1.d dVar, Bitmap bitmap, int i10, int i11); }