Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5196

Wrong color space detected for some Jpeg images

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.23
    • 2.0.24, 3.0.0 PDFBox
    • Parsing
    • None

    Description

      When retrieving the number of components in a jpeg image, class org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory seems to retrieve the wrong metadata ("markerSequence/sos/@numScanComponents" instead of "markerSequence/sof/@numFrameComponents").

      As a consequence, a wrong color space might be assigned to the image, preventing such image to be properly rendered in an PDF document.

      Attached is a jpeg file whose color space will be wrongly determined (PDDeviceGray.INSTANCE instead of PDDeviceRGB.INSTANCE)

       

       

       

      Attachments

        1. lotus.jpg
          47 kB
          Stéphane Vallée

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tilman Tilman Hausherr
            stephane_vallee Stéphane Vallée
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment