Menu

#434 Unable to threshold under Fedora 41

v1.0_(example)
open
nobody
None
5
2024-12-04
2024-12-03
No

Hello all,

Using gscan2pdf v2.13.4 under Fedora 41.

Since an upgrade from Fedora 40 to 41, I can no longer use the Threshold function. Visually, nothing seems to happen when I click Apply. If I then try to save the file (Ctrl+S), this fails or simply does not work.

When run with the --debug flag, gscan2pdf spits out the following lines on the terminal when executing the Threshold command. Note the quoting (encoding?) artifacts in the output:

DEBUG - Free space in /tmp/gscan2pdf-WFp9 (Mb): 7732.87109375 (warning at 10)
INFO - magick /tmp/gscan2pdf-WFp9/4YZ5m29BC7.png +dither -threshold 50% /tmp/gscan2pdf-WFp9/B5M2kC2OYK.pbm
INFO - Spawned PID 7302
WARN - Caught error getting pixbuf: Couldn’t recognize the image file format for file “/tmp/gscan2pdf-WFp9/opgXwg2hW0.pbm” at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 67.

INFO - Replaced /tmp/gscan2pdf-WFp9/4YZ5m29BC7.png (812452AE-B14D-11EF-A83C-D864B52592BA) at page 7 with /tmp/gscan2pdf-WFp9/opgXwg2hW0.pbm (812452AE-B14D-11EF-A83C-D864B52592BA), resolution    200,  200
WARN - *** unhandled exception in callback:
***   Couldnât recognize the image file format for file â/tmp/gscan2pdf-WFp9/opgXwg2hW0.pbmât recognize the image file format for file â/tmp/gscan2pdf-WFp9/opgXwg2hW0.pbmâ

If I run the shown magick command manually in the terminal, this works as expected and returns 0 without any errors. Under Fedora 40, the same version (v2.13.4) works as expected.

Is this a known issue? Can this be resolved? How can I help?

Kind regards,
FWieP

Discussion

  • Jeffrey Ratcliffe

    I use Debian, which has not yet migrated to imagemagick 7. Because of the API differences, the Fedora maintainer has patched gscan2pdf. So this is a problem which I can't reproduce and thus can't easily fix.

    see https://sourceforge.net/p/gscan2pdf/bugs/431/

    Please report it to the Fedora maintainer (https://packages.fedoraproject.org/pkgs/gscan2pdf/gscan2pdf/).

     
    • Frans-Willem Post

      Thank you. I have reached out to the Fedora maintainers via e-mail.

       
  • Petr Písař

    Petr Písař - 2024-12-04

    There is no difference in Fedora 41 and 40 gscan2pdf package code.

    The error message is not from magick command. It's from gdk-pixbuf2 library when gscan2pdf attempts to load PBM image file. That library delegates decoding images to separate modules. Default modules packaged in gdk-pixbuf2-modules removed support for PBM format https://bugzilla.redhat.com/show_bug.cgi?id=2276464. The support was reintroduced in a new gdk-pixbuf2-modules-extra-2.42.12-2.fc41 package. I added that package to dependencies for gscan2pdf source package a gscan2pdf-tests package.

    But I did not realize that gscan2pdf used PBM format internally for some operations, like for the threshold. I will fix it. In the mean time explicitly installing gdk-pixbuf2-modules-extra RPM package should resolve your problem.

     
    👍
    1
    • Petr Písař

      Petr Písař - 2024-12-04

      This is fixed in gscan2pdf-2.13.4-2.fc41.

       
      ❤️
      1

Log in to post a comment.

MongoDB Logo MongoDB