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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.23
    • Fix Version/s: 2.0.24, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      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

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              stephane_vallee Stéphane Vallée

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment