Skip to content

jpeg2000 support in capacitor android #3

@Raghavaraju-K

Description

@Raghavaraju-K

Hi,
I have tried this library for jpeg2000 image renderin in capacitor 4(Android) but its not working.I mean the image is not loading in android 12(Samsung SM M32)

Below is my code
if (mediaType == "image/jp2") {
val jp2Image = arrayElement.getString(3)
val byteArray = Base64.decode(jp2Image, Base64.DEFAULT)
try {
val bmpOne: Bitmap = JP2Decoder(byteArray).decode()
val jp2data = JP2Encoder(bmpOne).encode()
arrayElement.put(3,jp2data )
ListArray.put(arrayElement)
value.put("List",ListArray)
println("JP2000 Image found! Decoding...")
} catch (e:Exception ) {
e.printStackTrace()
}
}
val ret = JSObject()
ret.put("name", "jpgvalue")
ret.put("value", value)
call.resolve(ret)

Could you please confirm if this library works in ionic framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions