what-the-bank/sources/com/kofax/mobile/sdk/ae/f.java

55 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.mobile.sdk.ae;
import android.graphics.Bitmap;
import com.kofax.kmc.ken.engines.processing.CropType;
import com.kofax.kmc.ken.engines.processing.DocumentDimensions;
import com.kofax.kmc.ken.engines.processing.ImageProcessorConfiguration;
import com.kofax.mobile.sdk._internal.impl.detection.i;
import com.kofax.mobile.sdk._internal.impl.detection.j;
import com.kofax.mobile.sdk._internal.impl.detection.k;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes3.dex */
public class f {
i Ua = new i();
public g a(ImageProcessorConfiguration imageProcessorConfiguration, Bitmap bitmap) {
d.b(imageProcessorConfiguration);
if (CropType.CROP_NONE.equals(imageProcessorConfiguration.cropType)) {
return l(bitmap);
}
return a(this.Ua.a(c(imageProcessorConfiguration), bitmap));
}
public void doCleanUp() {
this.Ua.doCleanUp();
}
private k c(ImageProcessorConfiguration imageProcessorConfiguration) {
k kVar = new k();
kVar.advancedConfiguration = imageProcessorConfiguration.advancedConfiguration;
kVar.HJ = d(imageProcessorConfiguration);
kVar.HK = imageProcessorConfiguration.outputDPI;
return kVar;
}
private g a(j jVar) {
return new g(jVar.getProcessedImage(), jVar.getBounds(), jVar.lR());
}
private g l(Bitmap bitmap) {
return new g(bitmap, null, false);
}
private List<Float> d(ImageProcessorConfiguration imageProcessorConfiguration) {
DocumentDimensions documentDimensions = imageProcessorConfiguration.documentDimensions;
if (documentDimensions == null || documentDimensions.getLongEdge() == null || documentDimensions.getShortEdge() == null) {
return null;
}
ArrayList arrayList = new ArrayList();
arrayList.add(Float.valueOf(documentDimensions.getLongEdge().floatValue() / documentDimensions.getShortEdge().floatValue()));
return arrayList;
}
}