https://bugs.documentfoundation.org/show_bug.cgi?id=119686

Julien Nabet <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|[email protected] |[email protected]
                   |desktop.org                 |

--- Comment #12 from Julien Nabet <[email protected]> ---
Patch waiting for review here:
https://gerrit.libreoffice.org/c/core/+/134235

I was so convinced it was due to lzw decoding but in fact, the pb was more
general and present in ConvertScanline.
Image width is 30 pixels, since the parameter of the file was 1bit per pixels,
it needs 4 bytes per row (the last 2 bits of byte 4 is unused).
The mechanism to read a full byte was ok, the pb was when reading an incomplete
byte (so the fourth one in our case).
Indeed, it's using shifting operation to read each bit of the last byte but the
shifting value was the same at each loop.
It explains the previous comment, LO was fetching the same bit for all the
remaining bits to read in the fourth byte.

With the patch the initial example and the more complex one works.

Also, it may help for tiff files using 1 bit per pixel with no byte
swap/fillorder (I think the most general case), not only those using LZW
compression.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to