Skip to content

Instantly share code, notes, and snippets.

@XBigTK13X
XBigTK13X / pdf-extract-images.py
Last active February 12, 2025 16:46
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
The privacy policy is simple: no personal data shared with us will be given to any third party, under any circumstances. Your data will also never be used by us for any purpose without specific permission.
The app engages in no ad targeting, data mining, or other activities that may compromise your privacy, and we do not affiliate ourselves with any third parties that do so.