PdfBox-Android icon indicating copy to clipboard operation
PdfBox-Android copied to clipboard

WebP image Support

Open markusressel opened this issue 3 years ago • 1 comments

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

markusressel avatar Jun 16 '21 11:06 markusressel

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

TomRoush avatar Jul 05 '21 17:07 TomRoush