ICEpdf
  1. ICEpdf
  2. PDF-1195

Problem decoding rgb bitpack colour model

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.2.5
    • Fix Version/s: 6.3
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The pdf in question contains several images that have a rgb colour model and one bit per color component. The images are not correctly decoded show up as black images.

        Activity

        Hide
        Patrick Corless added a comment -

        After quite a bit of debugging I was able to touch up an issue we had when decoding and assigning the colour values. Basically we get the rgb colour values by reading each bit and then Or and bit shift the results to get the colour. The problem is that we are getting bit values, zero or one and after the bit shift we end up with the wrong value. Each bit represent either 0 or 255 and thus the problem. Updated the code with some multiplication and all is good.

        Show
        Patrick Corless added a comment - After quite a bit of debugging I was able to touch up an issue we had when decoding and assigning the colour values. Basically we get the rgb colour values by reading each bit and then Or and bit shift the results to get the colour. The problem is that we are getting bit values, zero or one and after the bit shift we end up with the wrong value. Each bit represent either 0 or 255 and thus the problem. Updated the code with some multiplication and all is good.
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: