Skip to content

Instantly share code, notes, and snippets.

View billfeth's full-sized avatar

Bill Feth billfeth

View GitHub Profile
@billfeth
billfeth / pdf-extract-images.py
Created May 9, 2024 21:04 — forked from XBigTK13X/pdf-extract-images.py
Extracts images from a PDF and attempts to compose any matching image masks.
#! /usr/bin/python3
# This script requires pdfimage (poppler-utils) and convert (imagemagick)
# Raw images will be written to <OUTPUT_DIR>/15-organized
# Attempts at merging masks and images will be output to <OUTPUT_DIR/30-masked>
# A sample of one image using all compose methods will be written to <OUTPUT_DIR>/25-samples
# Rewritten from https://gist.github.com/bendavis78/ed22a974c2b4534305eabb2522956359