Intelligence is simply talking to many people

Lighten, darken, increase contrast on (text) images, for readability (ImageMagick)

Lighten those pages

  • convert output.pdf -function polynomial 1,0,0,0 darkened.pdf
  • mogrify output.pdf -contrast-stretch 2%x20% music1C.pdf
  • convert -density 600 output.pdf output-%02d.jpg

(using rm to add security permissions then remove them after

sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/

-----When done, you can restore the original with

sudo mv /etc/ImageMagick-6/ /etc/ImageMagick-6/policy.xml

3 step process:

  • convert your_pdf_filename.pdf output-%02d.jpg
  • convert output*.jpg -level 25% final-%02d.jpg
  • convert final*.jpg very_readable.pdf

(change the level value)

With the arg -threshold you get a "black and white" (only) image. But I want to keep the gray scale, which is possible with the arg -level: you keep the gray, letting the image with a darker or lighter gray scale. (referring to something like <<< convert output*.jpg -normalize -threshold 80% final-%02d.jpg >>>

Comments: 0

Interested to discuss? Leave a comment.


Your email will not be published nor shared with anyone. In your text you can use markdown for marking up *italic*, links <> and other elements. These comments are moderated and published manually as soon as possible.