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

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 6.3 [ 13093 ]
        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.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51909 Fri Sep 15 12:11:47 MDT 2017 patrick.corless PDF-1195 fixed an issue that prevented rgb bit packed colours from
        being correctly decoded and displayed.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/core-awt/src/main/java/org/icepdf/core/pobjects/ImageStream.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51921 Wed Sep 20 09:00:19 MDT 2017 patrick.corless PDF-1195 fixed an issue that prevented rgb bit packed colours from
        being correctly decoded and displayed.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.2.0/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: