package xh;

import android.graphics.Bitmap;
import java.io.ByteArrayOutputStream;
import jh.h;
import lh.v;

/* loaded from: classes4.dex */
public class a implements e {

    /* renamed from: a, reason: collision with root package name */
    private final Bitmap.CompressFormat f50838a;

    /* renamed from: b, reason: collision with root package name */
    private final int f50839b;

    public a() {
        this(Bitmap.CompressFormat.JPEG, 100);
    }

    @Override // xh.e
    public v a(v vVar, h hVar) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ((Bitmap) vVar.get()).compress(this.f50838a, this.f50839b, byteArrayOutputStream);
        vVar.c();
        return new th.b(byteArrayOutputStream.toByteArray());
    }

    public a(Bitmap.CompressFormat compressFormat, int i10) {
        this.f50838a = compressFormat;
        this.f50839b = i10;
    }
}
