public class ImageSdkLibrary extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ImageSdkLibrary.ImageWriterType
ImageWriterImpl instance type |
Modifier and Type | Field and Description |
---|---|
static int |
IMAGE_WRITER_JPEG
Create an Android's JPEG writer.
|
static int |
IMAGE_WRITER_PDF
Create writer to save images in a PDFs
That writer supports interface
ImageFileWriter |
static int |
IMAGE_WRITER_PNG
Create an Android's PNG writer
|
static int |
IMAGE_WRITER_PNG_EXT
Create writer to save images as PNG using DI SDK.
|
static int |
IMAGE_WRITER_TIFF
Create writer for monochrome TIFF (G4 compression) images.
|
static int |
IMAGE_WRITER_UNKNOWN
Some invalid value to use as "nothing"
|
static int |
IMAGE_WRITER_WEBM
Create an Android's WEBM writer
|
static String |
SDK_CHECK_DOCUMENT_GEOMETRY
Constant string to perform an additional Effective Document Area (the area Document occupies in viewfinder by itself without surrounding space) check.
|
static String |
SDK_DOCUMENT_DISTORTION_CHECKED
Constant string to get Document distortion check result
|
static String |
SDK_DOCUMENT_DISTORTION_RATE
Deprecated.
|
static String |
SDK_DOCUMENT_FULLNESS_CHECKED
Constant string to get Document area check result
|
static String |
SDK_DOCUMENT_FULLNESS_RATE
Internal use
|
static String |
SDK_IS_SMART_CROP
Constant string to get detection quality
|
static String |
TAG |
static String |
version |
Constructor and Description |
---|
ImageSdkLibrary()
Create
ImageSdkLibrary instance with Application instance and licence stored with
load(Application, String) call. |
ImageSdkLibrary(android.app.Application application)
Create
ImageSdkLibrary instance with specified Application context
License key will read from assets |
ImageSdkLibrary(android.app.Application application,
int resId)
Deprecated.
|
ImageSdkLibrary(android.app.Application application,
String licenseKey)
Create
ImageSdkLibrary instance with specified Application context and license |
Modifier and Type | Method and Description |
---|---|
static android.content.Context |
getContext()
Deprecated.
|
static File |
getImageFile(android.content.Context context,
android.net.Uri contentUri)
Useful helper method.
|
static boolean |
load(android.app.Application application)
Initialize library by Application instance.
|
static boolean |
load(android.app.Application application,
int resId)
Using resources to read license key
|
static boolean |
load(android.app.Application application,
String licenseKey)
Initialize library by Application instance.
|
AutoShotDetector |
newAutoShotDetectorInstance()
Creates
AutoShotDetector |
CutoutAverageF |
newCutoutAverageInstance(int slidingLength)
Creates a
CutoutAverage |
DocumentCutout |
newDocumentCutoutInstance()
Creates a
DocumentCutout |
ImageWriter |
newImageWriterInstance(int type)
Create a new image writer instance
|
ImageProcessing |
newProcessingInstance()
Create a new processing instance
|
ImageSdkLibrary |
usingSdk(int type)
Deprecated.
|
public static final String version
public static final String TAG
public static final int IMAGE_WRITER_UNKNOWN
public static final int IMAGE_WRITER_JPEG
public static final int IMAGE_WRITER_PNG
public static final int IMAGE_WRITER_WEBM
public static final int IMAGE_WRITER_TIFF
public static final int IMAGE_WRITER_PDF
ImageFileWriter
public static final int IMAGE_WRITER_PNG_EXT
IMAGE_WRITER_PNG
creates more compact PNG, especially in case of Black & White images.public static final String SDK_IS_SMART_CROP
public static final String SDK_CHECK_DOCUMENT_GEOMETRY
public static final String SDK_DOCUMENT_FULLNESS_CHECKED
public static final String SDK_DOCUMENT_FULLNESS_RATE
public static final String SDK_DOCUMENT_DISTORTION_CHECKED
@Deprecated public static final String SDK_DOCUMENT_DISTORTION_RATE
public ImageSdkLibrary()
ImageSdkLibrary
instance with Application
instance and licence stored with
load(Application, String)
call.public ImageSdkLibrary(@NonNull android.app.Application application)
ImageSdkLibrary
instance with specified Application
context
License key will read from assetsapplication
- Application
instancepublic ImageSdkLibrary(@NonNull android.app.Application application, @Nullable String licenseKey)
ImageSdkLibrary
instance with specified Application
context and licenseapplication
- an Application
instancelicenseKey
- licence key string@Deprecated public ImageSdkLibrary(@NonNull android.app.Application application, @StringRes int resId)
public static boolean load(@NonNull android.app.Application application)
newProcessingInstance()
()} without Application
argument.
You can see an example in the demo application in file "SdkFactory.java" al line 107 (method getLibrary()
)application
- Application
instancepublic static boolean load(@NonNull android.app.Application application, @Nullable String licenseKey)
newProcessingInstance()
()} without Application and license arguments.application
- an Application
instancelicenseKey
- licence key stringpublic static boolean load(@NonNull android.app.Application application, @StringRes int resId)
application
- application an Application
instanceresId
- license key string resource id.true
if successfully@Deprecated public static android.content.Context getContext()
public ImageProcessing newProcessingInstance()
ImageProcessing
instancepublic ImageWriter newImageWriterInstance(int type) throws ImageWriterException
type
- ImageSdkLibrary.ImageWriterType
ImageWriterImpl
instanceImageWriterException
- if an error occurs@Deprecated public ImageSdkLibrary usingSdk(int type)
public DocumentCutout newDocumentCutoutInstance()
DocumentCutout
DocumentCutout
instancepublic CutoutAverageF newCutoutAverageInstance(int slidingLength)
CutoutAverage
slidingLength
- average sizeCutoutAverage
instancepublic AutoShotDetector newAutoShotDetectorInstance()
AutoShotDetector
AutoShotDetector
instancepublic static File getImageFile(@NonNull android.content.Context context, @NonNull android.net.Uri contentUri)
context
- ContextcontentUri
- uri to load