[
https://issues.apache.org/jira/browse/PDFBOX-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16422066#comment-16422066
]
Maruan Sahyoun commented on PDFBOX-4176:
----------------------------------------
Could you test with {{PDImageXObject.createFromFileByContent}}.
The message is generated because the content of the {{byte[]}} is not detected
to be a TIFF image by the {{FileTypeDetector}}. Are you sure that you are
passing a TIFF image?
If that doesn't help please attach the TIFF in question.
> PDImageXObject doesn't support TIFF although JavaDoc says it does
> -----------------------------------------------------------------
>
> Key: PDFBOX-4176
> URL: https://issues.apache.org/jira/browse/PDFBOX-4176
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.9
> Reporter: Kamil
> Priority: Major
>
> This code:
> {code}
> final PDImageXObject jpeg = PDImageXObject.createFromByteArray(doc,
> IOUtils.toByteArray(new FileInputStream(tiffFile)), "tiff.tif");
> {code}
> throws:
> {code}
> java.lang.IllegalArgumentException: Image type not supported: tiff.tif
> at
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromByteArray(PDImageXObject.java:351)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]