PageFileStorage

open class PageFileStorage(pageStorageProcessor: PageStorageProcessor, pageStorage: LegacyPageStorage, fileIOProcessor: FileIOProcessor)

Deprecated

Use new Document API instead.

Interaction class which could operate with Page files

Inheritors

Constructors

Link copied to clipboard
constructor(pageStorageProcessor: PageStorageProcessor, pageStorage: LegacyPageStorage, fileIOProcessor: FileIOProcessor)

Functions

Link copied to clipboard
fun add(image: Bitmap): String
fun add(image: ByteArray): String
fun add(image: Bitmap, pageImageSource: PageImageSource): String
fun add(image: ByteArray, pageImageSource: PageImageSource): String

Adds original image in the storage, and returns pageId. Creates previews, and doesn't detect contours.

fun add(image: Bitmap, configuration: PageStorageProcessor.Configuration = PageStorageProcessor.Configuration.DEFAULT()): Page

Adds image in the storage, does not create document and returns Page. Creates previews.

fun add(image: ByteArray, configuration: PageStorageProcessor.Configuration = PageStorageProcessor.Configuration.DEFAULT()): Page

Adds image in the storage, does not create document, and returns Page. Creates previews.

Link copied to clipboard
fun generateAndSetFilteredPreviewForId(filteredImage: Bitmap, existingPageId: String, parametricFilter: ParametricFilter): Bitmap
fun generateAndSetFilteredPreviewForId(filteredImage: ByteArray, existingPageId: String, parametricFilter: ParametricFilter): Bitmap

Generates a preview image of given filteredImage and saves (replaces or creates) it as file for existingPageId, for parametricFilter.

Link copied to clipboard
fun getFilteredPreviewImage(pageId: String, parametricFilter: ParametricFilter, options: BitmapFactory.Options? = null): Bitmap?

Provides filtered preview image Bitmap for provided filter

Link copied to clipboard
fun getFilteredPreviewImageURI(pageId: String, parametricFilter: ParametricFilter): Uri

Provides filtered preview imageUri Uri for provided filter

Link copied to clipboard
fun getImage(imageFile: File, options: BitmapFactory.Options? = null): Bitmap?

Provides image Bitmap from provided File

fun getImage(pageId: String, type: PageFileType, options: BitmapFactory.Options? = null): Bitmap?

Provides image Bitmap for provided type

Link copied to clipboard
fun getImageURI(pageId: String, type: PageFileType): Uri

Provides imageUri Uri for provided type

Link copied to clipboard
fun getPreviewImage(pageId: String, type: PageFileType, options: BitmapFactory.Options? = null): Bitmap?

Provides preview image Bitmap for provided type

Link copied to clipboard

Provides preview imageUri Uri for provided type

Link copied to clipboard

Provides List with all pageIds

Link copied to clipboard
fun remove(pageId: String): Boolean

Removes all files for pageId

Link copied to clipboard

Removes all files

fun removeAll(pageIds: List<String>)

Removes files for pages with given pageIds

Link copied to clipboard
fun removeAllExcept(pageIds: List<String>)

Removes all files, except list of provided pages

Link copied to clipboard

Removes/deletes all filtered preview images of the page.

Link copied to clipboard
fun setFilteredPreviewForId(filteredPreview: Bitmap, existingPageId: String, parametricFilter: ParametricFilter)
fun setFilteredPreviewForId(filteredPreview: ByteArray, existingPageId: String, parametricFilter: ParametricFilter)

Replace or creates filtered preview images for existingPageId, for filter

Link copied to clipboard
fun setImageForId(image: Bitmap, existingPageId: String, type: PageFileType)
fun setImageForId(image: ByteArray, existingPageId: String, type: PageFileType)

Replace images for type, for existingPageId