Package openfoodfacts.github.scrachx.openfood.images

Types

Link copied to clipboard
object ImageNameParser
Link copied to clipboard
enum ImageSize : Enum<ImageSize>

Image size. Warn: don't change these values: they are used to retrieve API keys

Link copied to clipboard
data class ImageTransformation(    val rotationInDegree: Int = 0,     val cropRectangle: Rect? = null,     var imageUrl: String? = null,     var imageId: String? = null)
Link copied to clipboard
data class ProductImage(    val barcode: Barcode,     val field: ProductImageField,     val language: String?,     val bytes: ByteArray,     val filePath: String? = null)

Functions

Link copied to clipboard
fun createImageBundle(    imageType: ProductImageField?,     product: Product?,     language: String?,     imageUrl: String): Bundle
Link copied to clipboard
fun Map<String, Map<String, *>>.getDimension(key: String): Int

Get the specified key from the map of sizes

Link copied to clipboard
fun Product.getImageStringKey(field: ProductImageField): String
fun getImageStringKey(field: ProductImageField, language: String): String
Link copied to clipboard
fun getImageUrl(    barcode: Barcode,     imageName: String,     size: Int): String
fun getImageUrl(    barcode: Barcode,     imageName: String,     size: String): String
Link copied to clipboard
fun getInitialServerTransformation(    product: Product,     productImageField: ProductImageField,     language: String): ImageTransformation
Link copied to clipboard
fun getLanguageCodeFromUrl(field: ProductImageField?, url: String?): String?
Link copied to clipboard
@Contract(pure = true)
fun getResourceId(field: ProductImageField): Int
Link copied to clipboard
@Contract(pure = true)
fun getResourceIdForEditAction(field: ProductImageField): Int
Link copied to clipboard
fun getScreenTransformation(    product: Product,     productImageField: ProductImageField,     language: String): ImageTransformation
Link copied to clipboard
fun toServerTransformation(    screenTransformation: ImageTransformation,     product: Product,     productImageField: ProductImageField,     language: String): ImageTransformation

Properties

Link copied to clipboard
const val ANGLE: String
Link copied to clipboard
const val BOTTOM: String
Link copied to clipboard
const val IMAGE_EDIT_SIZE: Int = 400
Link copied to clipboard
const val IMAGE_FILE: String
Link copied to clipboard
const val IMAGE_STRING_ID: String
Link copied to clipboard
const val IMAGE_TYPE: String
Link copied to clipboard
const val IMAGE_URL: String
Link copied to clipboard
const val IMG_ID: String
Link copied to clipboard
const val LANGUAGE: String
Link copied to clipboard
const val LEFT: String
Link copied to clipboard
const val NO_VALUE: Int
Link copied to clipboard
const val PRODUCT: String
Link copied to clipboard
const val PRODUCT_BARCODE: String
Link copied to clipboard
const val RIGHT: String
Link copied to clipboard
const val TOP: String