PdfBox-Android
PdfBox-Android copied to clipboard
WebP image Support
Hey there,
is it possible to create an PDImageXObject
from an WebP compressed image file/buffer?
I have tried to use the JPEGFactory but it only gives a blank image.
I also tried this, but honestly I am not even sure what I am doing there 😅:
val pdImage = PDImageXObject(
document,
ByteArrayInputStream(outputStream.toByteArray()),
COSName.DCT_DECODE,
compressedBitmap.width,
compressedBitmap.height,
8,
PDDeviceRGB.INSTANCE
)
Thx
Not at the moment, but since Android Bitmaps are used by Pdfbox-Android, it might be possible to add support if they can be converted easily to JPEG / Lossless by Android