what-the-bank/sources/com/kofax/android/abc/vrs/VrsImage.java

86 lines
2.0 KiB
Java

package com.kofax.android.abc.vrs;
import android.graphics.Bitmap;
import org.bouncycastle.asn1.x509.DisplayText;
/* loaded from: classes3.dex */
public class VrsImage {
private long m_impl = nativeCreate();
private int m_rc;
public static native boolean nativeStaticInitializer();
public native int fromGrayscale(byte[] bArr, int i, int i2, int i3);
public native int fromNv21(byte[] bArr, int i, int i2, int i3);
public native long nativeCreate();
public native void nativeDispose();
public native int nativeFromBitmap(Bitmap bitmap, int i);
public native int nativeFromFile(String str);
public native void nativeScale(double d, int i, int i2, long j);
public native Bitmap nativeToBitmap();
public native int nativeToFile(String str);
public native int nativeToFile(String str, int i);
static {
if (!nativeStaticInitializer()) {
throw new RuntimeException("com.kofax.android.abc.vrs.VrsImage: Static initializer failed.");
}
}
public void dispose() {
nativeDispose();
this.m_impl = 0L;
}
public int fromFile(String str) {
return nativeFromFile(str);
}
public int toFile(String str) {
return nativeToFile(str);
}
public int toFile(String str, int i) {
return nativeToFile(str, i);
}
public int fromBitmap(Bitmap bitmap) {
return fromBitmap(bitmap, DisplayText.DISPLAY_TEXT_MAXIMUM_SIZE);
}
public int fromBitmap(Bitmap bitmap, int i) {
return nativeFromBitmap(bitmap, i);
}
public Bitmap toBitmap() {
return nativeToBitmap();
}
public VrsImage scale(double d, int i, int i2) {
VrsImage vrsImage = new VrsImage();
nativeScale(d, i, i2, vrsImage.getPtr());
return vrsImage;
}
protected void finalize() throws Throwable {
dispose();
}
public long getPtr() {
return this.m_impl;
}
public long getLastReturnCode() {
return this.m_rc;
}
}