Skip to content

About

A small app to batch extract image files from PDF and DOCX files, with IPTC metadata.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Aagedal Image Extractor

A macOS app for batch extracting embedded images from PDF, Microsoft Office, OpenDocument, EPUB, ZIP/CBZ, and RTF/RTFD files. Supports original-format, JPEG, TIFF, PNG, and lossless JPEG XL output, optional OCR to produce searchable PDFs, and IPTC metadata writing.

SCR-20260212-mzyw

Installation

Homebrew

brew install --cask aagedal/tap/aagedal-image-extractor

Latest release

Version 1.2.0

Features

  • Drag-and-drop documents, ebooks, rich-text packages, and image archives for processing
  • Office: DOCX/DOCM/DOTX/DOTM, PPTX/PPTM/POTX/POTM/PPSX/PPSM, XLSX/XLSM/XLTX/XLTM
  • OpenDocument: ODT/ODP/ODS and OTT/OTP/OTS templates
  • Other inputs: EPUB, ZIP, CBZ, RTF, RTFD, plus native legacy DOC/PPT/XLS extraction
  • Export formats: Keep original format, JPEG, TIFF, PNG (preserves transparency), lossless JPEG XL
  • OCR: Generate a searchable PDF alongside extracted images (macOS Vision framework)
  • Image metadata: Write headline, description, accessibility description, keywords, and copyright via ExifTool, with a live example in settings
  • Output options: Save next to originals or to a custom directory
  • Consistent batches: Export format, OCR, metadata, tools, and output destination are captured when extraction starts; settings changes apply to the next batch. Remove queued documents to skip them, and add documents for the next batch.
  • Retry failed documents: Click the retry arrow, adjust settings if needed, then click Extract. Each attempt uses a fresh output folder and preserves earlier partial exports.
  • Preserve previous exports: Repeated exports and documents with matching names receive separate numbered output folders
  • Bundled tools: Ships with pdfimages, cjxl and exiftool — no manual installation required
  • Homebrew override: Optionally use Homebrew-installed versions of pdfimages and exiftool instead of the bundled copies

Requirements

  • macOS 15.0 or later
  • The prebuilt release is for Apple silicon Macs.

Building from Source

  1. Open Aagedal Image Extractor.xcodeproj in Xcode.
  2. Install build prerequisites with brew install poppler jpeg-xl, then run Scripts/prepare-vendor.sh to prepare bundled pdfimages, cjxl and exiftool.
  3. Build and run.

The build phase script Scripts/bundle-tools.sh automatically copies the vendored tools into the app bundle.

Office and OpenDocument extraction reads embedded image files, including media in headers and slide masters; it does not render document pages, slides, charts, or linked images. Macro-enabled files are read as archives; macros are not executed. EPUB extraction follows image entries in package manifests, including covers, and does not download remote images. Encrypted EPUB images and password-encrypted documents are not supported; obfuscated EPUB fonts do not prevent extraction of unencrypted images. ZIP/CBZ extraction searches nested folders, preserves images with equal basenames, and ignores hidden metadata folders and symbolic links.

RTF extraction reads standard hex and binary picture payloads (PNG, JPEG, EMF, WMF, PICT and DIB). RTFD imports image attachments using macOS; non-image attachments are ignored. Some RTF documents include multiple representations of a picture, which may be exported separately. Raster conversion depends on macOS image decoding; embedded vector formats such as EMF and WMF, and raw DIB payloads, may fail conversion with an image-specific error. Choose Keep original format to retain those image files without raster conversion. Metadata writing, when enabled, still modifies exported files and depends on ExifTool support for their formats. OCR is available for PDF inputs only.

Legacy DOC/PPT/XLS extraction is native and requires no LibreOffice installation. It reads Office 97–2003 compound documents (Word 97+, PowerPoint Pictures streams, and Excel BIFF8 drawing groups), including mini streams and split Excel drawing records. Supported OfficeArt images are JPEG, PNG, TIFF, DIB, EMF, WMF and PICT; compressed metafiles are decompressed without rendering. Keep original format preserves stored raster payloads and uncompressed metafile data. Raster conversion of vector images and DIB depends on macOS decoding support, as with RTF. Duplicate image payloads are exported once per document.

Native legacy extraction reads stored image records rather than document layout or usage references, so stored but unused images and alternate representations may also be exported. It does not render charts, shapes, pages or slides, retrieve linked images, or extract images from embedded documents. Password-encrypted files, pre-97 binary formats, and non-compound files renamed to DOC/PPT/XLS are unsupported. Metafiles larger than 128 MiB uncompressed are rejected. All document formats work offline using the app and its bundled tools.

JPEG XL uses the reference cjxl encoder with lossless compression (distance 0, effort 7, up to 8 threads). JPEG inputs, including JPEGs embedded in PDFs, use reversible JPEG recompression: exporting a resulting JXL back to JPEG reconstructs the original JPEG bytes when reconstruction data is available. PNG inputs go directly to cjxl; other supported single-frame integer RGB/grayscale images use an ImageIO PNG intermediate that retains up to 16-bit samples, transparency and embedded ICC profiles. Floating-point, CMYK intermediates, and multi-page images are rejected rather than silently reducing their fidelity; choose original-format export for these. PNG animation is passed through to cjxl. Container-specific source metadata may not survive the PNG intermediate, and enabled metadata writing can change exported metadata.

The encoder is bundled for release builds and can be overridden with Homebrew (brew install jpeg-xl) in Dependencies. Developers can prepare only this tool with python3 Scripts/prepare-jpeg-xl.py; its transitive dylibs are copied and relocated so the bundle runs independently of Homebrew. A missing or failed encoder leaves the source image intact.

For PDF original-format export, pdfimages -all preserves JPEG, JPEG 2000, JBIG2 and CCITT encodings where available; other images are decoded to PNG/TIFF. JBIG2 globals (.jb2g) and CCITT parameter files (.params) are saved alongside their images and are not counted as additional images. Original format therefore means the extraction tool's native output, not a promise that every PDF image has a standalone original file.

Run Scripts/test-format-support.sh for standalone format, extraction, and batch-processing regression checks, including real RTF/RTFD fixtures and native legacy Office binary fixtures. Requires Xcode command line tools; no bundled tools or package downloads needed. Install jpeg-xl and pass the path to an existing Xcode Debug derived data directory to also test PNG conversion, original-byte preservation, JPEG reconstruction, 16-bit Display P3 fidelity, encoder failures, and transparency, for example Scripts/test-format-support.sh /tmp/aagedal-image-extractor-build.

Metadata behavior

Enable Metadata in the toolbar, then select the fields to write. The example uses Example.pdf, page 3, and updates as you edit. Include document name uses the full source filename, including its extension. Before/After controls whether custom text precedes or follows that name. Extended Description adds a page number for extracted PDF images; other inputs include only the filename.

Headline writes XMP photoshop:Headline and IPTC Headline. Description writes XMP dc:Description and IPTC Caption-Abstract. Copyright writes XMP dc:Rights and IPTC CopyrightNotice. Keywords writes XMP dc:Subject and IPTC Keywords. Extended Description writes XMP IPTC Core ExtDescrAccessibility. See the ExifTool XMP tag reference for the underlying fields.

JPEG XL receives XMP fields only. Other formats receive both XMP and IPTC requests; which fields can be stored depends on the image format and ExifTool support. Metadata writing happens after format conversion and modifies the exported images, including Keep original format exports. Source documents are never modified.

Disabled fields and fields with no generated or custom text leave existing metadata unchanged. Nonempty text fields replace their corresponding values. Keywords are split on commas or semicolons, trimmed, and empty entries discarded; the resulting list replaces existing keywords. Whitespace-only custom text is ignored. No metadata is written when the master Enable switch is off. Changes made during extraction apply to the next batch.

Scripts/test-format-support.sh also checks metadata resolution and preview values. When exiftool is available on PATH, it verifies XMP/IPTC values against a real exported JPEG, including keyword replacement and preservation of unchanged fields.

Acknowledgements

This app relies on the following open-source tools:

  • pdfimages (Poppler) — Extracts images from PDF files. Poppler is licensed under the GNU General Public License (GPL).
  • ExifTool by Phil Harvey — Reads and writes metadata in image files. ExifTool is licensed under the Artistic License or the GNU General Public License.
  • libjxl / cjxl — Reference JPEG XL encoder. BSD 3-Clause license.
  • jxl-coder-swift — JPEG XL decoding and JPEG reconstruction support via Swift Package Manager.

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for the full text.

About

A small app to batch extract image files from PDF and DOCX files, with IPTC metadata.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages