81 lines
3.4 KiB
Java
81 lines
3.4 KiB
Java
|
package org.beyka.tiffbitmapfactory;
|
||
|
|
||
|
import android.graphics.Bitmap;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import java.io.File;
|
||
|
import org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;
|
||
|
import org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class TiffSaver {
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static final class SaveOptions {
|
||
|
public String author;
|
||
|
public String copyright;
|
||
|
public String imageDescription;
|
||
|
public long inAvailableMemory = 256000000;
|
||
|
public boolean inThrowException = false;
|
||
|
public CompressionScheme compressionScheme = CompressionScheme.NONE;
|
||
|
public Orientation orientation = Orientation.TOP_LEFT;
|
||
|
public float xResolution = BitmapDescriptorFactory.HUE_RED;
|
||
|
public float yResolution = BitmapDescriptorFactory.HUE_RED;
|
||
|
public ResolutionUnit resUnit = ResolutionUnit.NONE;
|
||
|
}
|
||
|
|
||
|
public static native synchronized boolean save(String str, int i, Bitmap bitmap, SaveOptions saveOptions, boolean z);
|
||
|
|
||
|
static {
|
||
|
System.loadLibrary("rbae");
|
||
|
System.loadLibrary("w52a77");
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(File file, Bitmap bitmap) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return saveBitmap(file.getAbsolutePath(), bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(File file, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException {
|
||
|
return saveBitmap(file.getAbsolutePath(), bitmap, saveOptions);
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(String str, Bitmap bitmap) throws CantOpenFileException {
|
||
|
return saveBitmap(str, bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(String str, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException {
|
||
|
return save(str, -1, bitmap, saveOptions, false);
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(File file, Bitmap bitmap) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return appendBitmap(file.getAbsolutePath(), bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(File file, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException {
|
||
|
return appendBitmap(file.getAbsolutePath(), bitmap, saveOptions);
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(String str, int i, Bitmap bitmap) throws CantOpenFileException {
|
||
|
return appendBitmap(str, bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(String str, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException {
|
||
|
return save(str, -1, bitmap, saveOptions, true);
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(int i, Bitmap bitmap) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return saveBitmap(i, bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean saveBitmap(int i, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return save(null, i, bitmap, saveOptions, false);
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(int i, Bitmap bitmap) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return appendBitmap(i, bitmap, new SaveOptions());
|
||
|
}
|
||
|
|
||
|
public static boolean appendBitmap(int i, Bitmap bitmap, SaveOptions saveOptions) throws CantOpenFileException, NotEnoughtMemoryException {
|
||
|
return save(null, i, bitmap, saveOptions, true);
|
||
|
}
|
||
|
}
|