Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script-Fu levels Newbie Gimp 2.10 Linux MX
#3
Sorry I can't do script-fu Wink For linux users

ImageMagick (IM), because of backward compatibility issues, most linux is still IM6 The IM developers have a very good single file static IM7 'magick' for Linux

If you have permission issues check with IM identify -list policy you can make a ~/.config/ImageMagick/policy.xml (saves delving into root)

Code:
<policymap>
    <policy domain="coder" rights="read|write" pattern="PDF" />
</policymap>

------------

However a non-IM non-Gimp proposition. 
pdftoppm part of poppler-utils package will extract the pages @ 300 ppi
Code:
pdftoppm -jpeg -r 300 manual.pdf output

Gimp has to come into it somewhere Wink Using Filters -> Generic -> GEGL graph you can find a good value for the Colors -> Exposure filter (or you can just use the filter as long as you understand the syntax)

   

You do need the GEGL package, it might not be installed. Gimp will install libgegl but not necessarily the stand-alone GEGL
For a single image
Code:
gegl in.jpg -o out.jpg -- exposure exposure=3.2

Putting those together in a bash script with img2pdf to combine the result.

Code:
#!/bin/bash

pdftoppm -jpeg -r 300 manual.pdf output

  find . -name "*.jpg" | while read fname ; do
     echo "Doing:  $fname"

     gegl "$fname" -o /home/rich/temp/"$fname" -- exposure exposure=3.2

  done

img2pdf /home/rich/temp/*.jpg --output combined.pdf

Please excuse the 'hard encoded' names and paths, it is just a quick test. I am sure you will fix that. Rendered a 130 page PDF to a rather large new (all graphic) PDF in 1 min 30 seconds.

Edit: I was assuming that speed is a factor. Just got round to trying BIMP on the same 130 images, using the color curve correction, and that is only 2 mins and a couple of seconds.
Reply


Messages In This Thread
RE: Script-Fu levels Newbie Gimp 2.10 Linux MX - by rich2005 - 11-27-2022, 12:21 PM

Forum Jump: