116 lines
4.6 KiB
Java
116 lines
4.6 KiB
Java
package org.beyka.tiffbitmapfactory;
|
|
|
|
import android.graphics.Bitmap;
|
|
import java.io.File;
|
|
import org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;
|
|
import org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException;
|
|
import org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class TiffBitmapFactory {
|
|
public static Bitmap decodePath(String str, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
while (true) {
|
|
}
|
|
}
|
|
|
|
public static native Bitmap nativeDecodeFD(int i, Options options, IProgressListener iProgressListener);
|
|
|
|
public static native Bitmap nativeDecodePath(String str, Options options, IProgressListener iProgressListener);
|
|
|
|
static {
|
|
System.loadLibrary("rbae");
|
|
System.loadLibrary("t8946a");
|
|
}
|
|
|
|
/* loaded from: classes6.dex */
|
|
public enum ImageConfig {
|
|
ARGB_8888(2),
|
|
RGB_565(4),
|
|
ALPHA_8(8);
|
|
|
|
final int ordinal;
|
|
|
|
ImageConfig(int i) {
|
|
this.ordinal = i;
|
|
}
|
|
}
|
|
|
|
public static Bitmap decodeFile(File file) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return decodeFile(file, new Options(), null);
|
|
}
|
|
|
|
public static Bitmap decodeFile(File file, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return decodeFile(file, options, null);
|
|
}
|
|
|
|
public static Bitmap decodeFile(File file, Options options, IProgressListener iProgressListener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
file.getAbsolutePath();
|
|
Bitmap nativeDecodePath = nativeDecodePath(file.getAbsolutePath(), options, iProgressListener);
|
|
file.getAbsolutePath();
|
|
return nativeDecodePath;
|
|
}
|
|
|
|
public static Bitmap decodePath(String str) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return decodePath(str, new Options(), null);
|
|
}
|
|
|
|
public static Bitmap decodePath(String str, Options options, IProgressListener iProgressListener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return nativeDecodePath(str, options, iProgressListener);
|
|
}
|
|
|
|
public static Bitmap decodeFileDescriptor(int i) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return decodeFileDescriptor(i, new Options(), null);
|
|
}
|
|
|
|
public static Bitmap decodeFileDescriptor(int i, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return decodeFileDescriptor(i, options, null);
|
|
}
|
|
|
|
public static Bitmap decodeFileDescriptor(int i, Options options, IProgressListener iProgressListener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
|
|
return nativeDecodeFD(i, options, iProgressListener);
|
|
}
|
|
|
|
/* loaded from: classes6.dex */
|
|
public static final class Options {
|
|
public DecodeArea inDecodeArea;
|
|
public int outBitsPerSample;
|
|
public CompressionScheme outCompressionScheme;
|
|
public int outCurDirectoryNumber;
|
|
public FillOrder outFillOrder;
|
|
public int outNumberOfStrips;
|
|
public Photometric outPhotometric;
|
|
public PlanarConfig outPlanarConfig;
|
|
public ResolutionUnit outResolutionUnit;
|
|
public int outRowPerStrip;
|
|
public int outSamplePerPixel;
|
|
public int outStripSize;
|
|
public int outTileHeight;
|
|
public int outTileWidth;
|
|
public float outXResolution;
|
|
public float outYResolution;
|
|
public ImageConfig inPreferredConfig = ImageConfig.ARGB_8888;
|
|
public String outAuthor = "";
|
|
public String outCopyright = "";
|
|
public String outImageDescription = "";
|
|
public String outSoftware = "";
|
|
public String outDatetime = "";
|
|
public String outHostComputer = "";
|
|
private volatile boolean isStoped = false;
|
|
public boolean inThrowException = false;
|
|
public boolean inUseOrientationTag = false;
|
|
public boolean inSwapRedBlueColors = false;
|
|
public boolean inJustDecodeBounds = false;
|
|
public int inSampleSize = 1;
|
|
public int inDirectoryNumber = 0;
|
|
public long inAvailableMemory = 256000000;
|
|
public int outWidth = -1;
|
|
public int outHeight = -1;
|
|
public int outDirectoryCount = -1;
|
|
public Orientation outImageOrientation = Orientation.UNAVAILABLE;
|
|
|
|
public final void stop() {
|
|
this.isStoped = true;
|
|
}
|
|
}
|
|
}
|