Skip to content

norbusan/png-pdftex-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

png-pdftex-tool

Check PNG files for pdfTeX fast copy compatibility or convert incompatible images into compatible format. This improves TeX compilation performance by avoiding PNG recompression.

Incompatible features

  • Palette/indexed color type
  • Alpha channels (RGBA, alpha)
  • Color/metadata chunks: gAMA, sRGB, cHRM, iCCP, sBIT, bKGD, hIST, tRNS, sPLT
  • Interlacing (Adam7)

Conversion methods

  • auto Try ImageMagick, pngcrush, and PNM in order (default)
  • imagemagick Use ImageMagick (convert/magick) only
  • pngcrush Use pngcrush only
  • pnm Use pngtopnm and pnmtopng for maximum chunk removal

Examples

  # Check single PNG
  png-pdftex-tool check image.png

  # Check all PNGs in directory
  png-pdftex-tool check --directory /path/to/images

  # Convert single PNG in-place
  png-pdftex-tool convert image.png

  # Convert and save to different file
  png-pdftex-tool convert image.png -o converted.png

  # Convert all PNGs in directory
  png-pdftex-tool convert --directory /path/to/images

  # Use specific method
  png-pdftex-tool convert image.png --method imagemagick

  # Don't create backups when overwriting
  png-pdftex-tool convert image.png --no-backup

  # Create .fastcopy.png variants instead of overwriting
  png-pdftex-tool convert --directory /path --no-inplace

License and Copyright

Copyright 2026 Norbert Preining

Licensed under GNU General Public License Version 3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages