You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/01/05 08:42:39 UTC
[jira] [Commented] (PDFBOX-3163) PDImageXObject.createFromFile
should relies on header bytes
[ https://issues.apache.org/jira/browse/PDFBOX-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082586#comment-15082586 ]
ASF subversion and git services commented on PDFBOX-3163:
---------------------------------------------------------
Commit 1723009 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1723009 ]
PDFBOX-3163: added creating PDImageXObject by content as suggested by Benjamin Gamard and Maciej Wo?niak, with Apache 2 licensed content detection code from Drew Noakes
> PDImageXObject.createFromFile should relies on header bytes
> -----------------------------------------------------------
>
> Key: PDFBOX-3163
> URL: https://issues.apache.org/jira/browse/PDFBOX-3163
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Benjamin Gamard
> Attachments: _PDFBOX_3163_.patch
>
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> PDImageXObject.createFromFile currently relies on file extension to select the correct factory.
> Often, file extension is not set or not correct.
> It should be better to use the first bytes.
> I did something similar here if it can helps: https://github.com/sismics/docs/blob/master/docs-core/src/main/java/com/sismics/util/mime/MimeTypeUtil.java#L26
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org