[ 
https://issues.apache.org/jira/browse/PDFBOX-5375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800768#comment-17800768
 ] 

Tilman Hausherr commented on PDFBOX-5375:
-----------------------------------------

Rendering is different with several files:
 * bugzilla1659412-JPX-4bit.pdf (however that one isn't rendered correctly 
before)
 * PDFBOX-1735-confidential.pdf (bottom left of page 1, maybe you have it)
 * PDFJS-9650-wrong-JPX-size-p1.pdf (attached)

> Allow creating of PDFXObjectImage without accessing to the image stream
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-5375
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5375
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.25, 3.0.0 PDFBox, 4.0.0
>            Reporter: Thomas Ledoux
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 2.0.31, 3.0.2 PDFBox, 4.0.0
>
>         Attachments: PDFJS-9650-wrong-JPX-size-p1.pdf, patch.txt, patch2.txt
>
>
> Currently, when a PDF embeds JPEG2000 images, the simple parsing of the file 
> generates a warning
> when the code hits a call to getXObject(name) from a PDResources for a image 
> without creating the
> underlining PDFXObjectImage object, related to the absence of the JAI 
> third-party.
> However, when we just want to access the width or height propertis (which are 
> defined outside the stream in the associated dictionnary).
> Looking at the constructor of PDFXObjectImage, it appears that the image is 
> always read to retrieve the colorspace.
> The proposed patch is moved this initialization to the getColorSpace() method 
> so that the object is created and the Exception will be raised only if the 
> image needs to be really accessed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to