Skip to main content
100%

Converts a directory of images into two directories, one large, one small of PNGs

✓ Published0🌍 Public
Aandrewxhill
Last edited Sep 26, 2012
Created on Sep 26, 2012

This script converts a directory of images into two resized PNG collections, preserving the original aspect ratio for large (1540-pixel-wide) and small (770-pixel-wide) versions. It processes TIF, TIFF, PNG, and JPG files using Python’s Pillow library (`Image.open`, `resize`, and `ANTIALIAS`), writing outputs into separate `large/` and `small/` subdirectories. The tool also generates a `details.js` file with JSON metadata containing each image’s original and resized dimensions, names, and paths, plus directory-level statistics like total count and creation timestamp.

AI-generated description

Similar vizzes