Public bug reported:
An envelope was scanned sideways to a PNG file, in grayscale.
Imagemagick "convert" was used to produce a PGM file. Then unpaper was
used to rotate it and bilevel it. This often works fine with no issues,
but exceptionally for one image in particular, unpaper cuts a box out of
the center of the image and shifts over the return address side of the
envelope, ultimately causing corruption. This is the command used:
$ unpaper -v -t pbm -b 0.2 --pre-rotate 90 sample.pgm sample_b20.pbm
output was:
-------------------------------------------------------------------------------
Processing sheet #1: sample.pgm -> sample_b20.pbm
pre-rotating 90 degrees.
input-file for sheet 1: sample.pgm
output-file for sheet 1: sample_b20.pbm
sheet size: 2747x1156
...
noise-filter ... deleted 20062 clusters.
blur-filter... deleted 387 pixels.
auto-masking (1373,578): 0,0,2746,1155 (invalid detection, using full page size)
gray-filter... deleted 13774552 pixels.
auto-masking (1373,578): -7,0,1458,1155
detected rotation left: [-7,0,1458,1155]: 0.003491
detected rotation right: [-7,0,1458,1155]: -0.054105
rotation average: -0.025307 deviation: 0.040726 rotation-scan-deviation
(maximum): 0.017453 [-7,0,1458,1155]
out of deviation range - NO ROTATING
rotate (1373,578): 0.000000
auto-masking (1373,578): -7,0,1458,1155
centering mask [-7,0,1458,1155] (1373,578): 647, 0
border detected: (0,25,1,21) in [0,0,2746,1155]
aligning mask [0,25,2745,1134] (0,22): 0, -3
writing output.
[image2 @ 0x561e104d1540] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.
[image2 @ 0x561e104d1540] Encoder did not produce proper pts, making some up.
-------------------------------------------------------------------------------
The input file is attached.
It's easy to see the problem by noticing the postmark date on the input
image, then seeing that the month and day are missing from the resulting
image.
** Affects: unpaper (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "input file"
https://bugs.launchpad.net/bugs/1916937/+attachment/5467122/+files/sample.pgm
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916937
Title:
unpaper truncates some images
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unpaper/+bug/1916937/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs