postpic
postpic · A PostgreSQL image type with SQL image-processing and metadata functions, backed by GraphicsMagick, plus import/export utilities.
Overview
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
postpic version 0.9.1 adds an image type backed by GraphicsMagick. SQL functions can load images from bytea or a large object, read width, height, date and EXIF-style attributes, and produce thumbnails, crops, rotations, drawings, and contact sheets.
Example
The example reads a server-side path and therefore requires privileged file access; applications should instead pass approved bytes through a controlled ingestion path. Image decoding runs native GraphicsMagick code inside a PostgreSQL backend, so malformed media can consume memory/CPU or hit decoder vulnerabilities. This is old code with no current PostgreSQL or GraphicsMagick compatibility statement. Restrict execution, cap input size, keep codecs patched, and evaluate only in an isolated environment.