Skip to content

transposed JBIG2 text segments with non-topleft reference corner don't render correctly #17883

@nico

Description

@nico

Attach (recommended) or Link to PDF file here (edit: Use the ones below instead #17883 (comment)):

symbol-texttranspose.pdf

symbol-topright-transposed.pdf

symbol-bottomleft-transposed.pdf

symbol-bottomright-transposed.pdf

Configuration:

Steps to reproduce the problem:

  1. Open each of the four PDFs above

What is the expected behavior? (add screenshot)

They should all look like the first one:

image

What went wrong? (add screenshot)

The ones that have the reference corner not set to topleft are in various states of disarray:

image image image

ITU-T_T_88__08_2018.pdf 6.4.5 Decoding the text region has two steps for updating cur_s, once in vi) Update CURS as follows: before drawing the bitmap, and then again xi) Update CURS as follows: after drawing the bitmap. It looks like 25f6a0c mixes up these two steps with the "is transposed" check. Depending on the reference corner, this needs to happen before or after drawing for both transposed and untransposed iamges.

Like in #17871: I made these files myself while writing a JBIG2 decoder. I'm reasonably confident that the files and Chrome and jbig2dec and my decoder are correct, but it's possible the files are wrong instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions