{"id":16117117,"url":"https://github.com/mlange-42/print-prep","last_synced_at":"2025-06-13T19:05:31.409Z","repository":{"id":137862799,"uuid":"258005352","full_name":"mlange-42/print-prep","owner":"mlange-42","description":"Command line tool for photo print preparation, written in Rust","archived":false,"fork":false,"pushed_at":"2020-04-28T22:47:18.000Z","size":950,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T19:05:19.018Z","etag":null,"topics":["image-processing","photo","photography","printing"],"latest_commit_sha":null,"homepage":"https://mlange-42.github.io/print-prep/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlange-42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-22T19:53:52.000Z","updated_at":"2024-04-26T02:19:28.000Z","dependencies_parsed_at":"2023-07-01T21:31:27.327Z","dependency_job_id":null,"html_url":"https://github.com/mlange-42/print-prep","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mlange-42/print-prep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlange-42%2Fprint-prep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlange-42%2Fprint-prep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlange-42%2Fprint-prep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlange-42%2Fprint-prep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlange-42","download_url":"https://codeload.github.com/mlange-42/print-prep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlange-42%2Fprint-prep/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259704410,"owners_count":22898858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","photo","photography","printing"],"created_at":"2024-10-09T20:28:34.457Z","updated_at":"2025-06-13T19:05:31.386Z","avatar_url":"https://github.com/mlange-42.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# print-prep\n\n[![Build Status](https://travis-ci.com/mlange-42/print-prep.svg?branch=master)](https://travis-ci.com/mlange-42/print-prep)\n\nCommand line tool for preparing photos for printing, and other bulk image operations.\n\n* **[Download binaries](https://github.com/mlange-42/print-prep/releases/)**\n* [Sources on GitHub](https://github.com/mlange-42/print-prep)\n\n**Content**\n* [Features](#features)\n* [Installation](#installation)\n* [Getting started](#getting-started)\n* [Examples](#examples)\n* [Commands](#commands)\n* [Library / crate](#library--crate)\n* [License](#license)\n\n## Features\n\n* Bulk image processing from the command line (Linux, Windows, OSX)\n* Bulk-prepare images for printing, with:\n  * Exactly predictable size and resolution,\n  * Cut marks and 'mat' framing,\n  * EXIF information (date, camera settings, GPS, ...),\n  * Print control element \n* Convenient syntax with arbitrary mixing of length units (*cm*, *mm*, *in*, *px*)\n* Automatically determines exact sizes for approximate *cm* formats (e.g., 10x15 is actually *10.2 cm x 15.2 cm*)\n* More image processing operations to come...\n\n## Installation\n\n* Download the [latest binaries](https://github.com/mlange-42/print-prep/releases/).\n* Unzip somewhere with write privileges (only required for running examples in place).\n\n## Getting started\n\n* See section [Examples](#examples) below, and try the batch files in sub-directory [/cmd_examples](https://github.com/mlange-42/print-prep/tree/master/cmd_examples). \n* For a full list of options, see section [Commands](#commands) or run `pprep -h`. Run `pprep --help` for a more comprehensive help message.\n* Run `pprep \u003csubcommand\u003e -h` or `pprep \u003csubcommand\u003e --help` for information on a particular command.\n\n## Examples\n\nA simple example for preparing prints with 'mats' (padding) and cut marks:\n\n```\npprep ^\n  --input \"test_data/*.jpg\" ^\n  --cmd ^\n  prep ^\n    --output \"test_data/out/*-marks.png\" ^\n    --format 10cm/15cm ^\n    --padding 5mm ^\n    --margins 5mm ^\n    --cut-marks ./1mm ^\n    --dpi 90\n```\n\n\u003e _Note 1:_ The ^ at the end of each line is required for breaking commands into multiple lines (at least on Windows).\n\n\u003e _Note 2:_ On Unix systems, the input pattern(s), as well as the output pattern with placeholder * **MUST be quoted**!.\n\nResulting in something like this:\n\n\u003c!-- ![Simple print preparation example](https://user-images.githubusercontent.com/44003176/80386704-0bad2000-88a8-11ea-85ed-81c40b471d6e.png)  --\u003e\n![Simple print preparation example](https://user-images.githubusercontent.com/44003176/80541201-0684c980-89ab-11ea-85f0-59d7c11c0a01.png)  \n_Simple print preparation example._\n\nFurther, we can add a print control element and some EXIF information to the image:\n\n```\n..\\target\\release\\pprep ^\n  --input \"../test_data/*.jpg\" ^\n  --cmd ^\n  prep ^\n    --output \"../test_data/out/*-exif.png\" ^\n    --format 10cm/15cm ^\n    --padding 5mm ^\n    --margins 5mm ^\n    --cut-marks ./1mm ^\n    --exif \"{F/2}, {Exp}, ISO {ISO}, {F}\" ^\n    --test-pattern 15px/3px ^\n    --dpi 150\n```\n\nNote the two new lines above `--dpi 150`! We get this:\n\n![Print preparation example with EXIF info and control element](https://user-images.githubusercontent.com/44003176/80541712-f4eff180-89ab-11ea-9888-8791f99a9b94.png)  \n_Print preparation example with EXIF info and control element._\n\n## Commands\n\nCommon options of all sub-commands are listed here.\nFor options of specific subcommands, see:\n\n**[`prep`](#prep) \u0026nbsp; [`scale`](#scale) \u0026nbsp; [`list`](#list)**\n\nCommon options:\n```\nCommand-line tool for photo print preparation and other bulk image operations.\n\nUse `pprep -h`     for help, or\n    `pprep --help` for more detailed help, or\n    `pprep \u003csubcommand\u003e -h` for help on an operation.\n\nFor more documentation, see the GitHub repository:\n     https://mlange-42.github.io/print-prep/\n\nUSAGE:\n    pprep [FLAGS] [OPTIONS] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -c, --cmd        Dummy option to end the `--input` list when no other top-level options are used.\n    -d, --debug      Debug print parsed command line options\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n    -w, --wait       Wait for user input after processing\n\nOPTIONS:\n    -i, --input \u003cinput\u003e...     List of input files or patterns. On Unix systems, patterns MUST be quoted!\n    -t, --threads \u003cthreads\u003e    Number of threads for parallel processing. Optional, default: number of processors\n\nSUBCOMMANDS:\n    help     Prints this message or the help of the given subcommand(s)\n    list     List files found by input pattern\n    prep     Prepare images for printing (add cut marks, 'mats', test patterns, EXIF information, ...).\n    scale    Scale images to absolute or relative size\n```\n\n### `prep`\n\n```\nPrepare images for printing (add cut marks, 'mats', test patterns, EXIF information, ...).\n\n\u003cpre\u003e\n     ________________________________________\n    |    |                              |    |\n    |    |                              |    |-----  format\n    |---- ------------------------------ ----|\n    |    |     ____________________     |----|-----  framed-size\n    |    |    |                    |    |    |\n    |    |    |                    |----|----|-----  image-size\n    |    |    |                    |    |    |       border\n    |    |    |                    |    |    |\n    |    |    |                    |   -|----|-----  padding\n    |    |    |                    |    |    |\n    |    |    |                    |    |   -|-----  margins\n    |    |    |____________________|    |    |\n    |    |                              |----|-----  cut-frame\n    |---- ------------------------------ ----|\n    |    |                              |----|-----  cut-marks\n    |____|______________________________|____|\n\u003c/pre\u003e\n\nUSAGE:\n    pprep prep [FLAGS] [OPTIONS] --format \u003cw/h\u003e --output \u003coutput\u003e\n\nFLAGS:\n    -h, --help           Prints help information\n        --incremental    Enable incremental scaling. For scaling to small sizes, scales down in multiple steps, to 50%\n                         per step, averaging over 2x2 pixels\n        --no-rotation    Prevents rotation of portrait format images (or of landscape format images if `--format` is\n                         portrait)\n    -V, --version        Prints version information\n\nOPTIONS:\n    -b, --bg \u003ccolor\u003e                    Background color. Default `white`\n        --border \u003ctp/rt/bm/lt\u003e          Border width around image. Default none. This is included in padding!\n        --border-color \u003ccolor\u003e          Border color. Default black\n        --color \u003ccolor\u003e                 Cut marks, frame and exif color. Default: black\n        --cut-frame \u003cw/off\u003e             Cut frame. Format \u003cline-width\u003e/\u003cextend\u003e. Use alternative to `--cut-marks`\n        --cut-marks \u003cw/off\u003e             Cut marks with offset. Format \u003cline-width\u003e/\u003coffset\u003e. Use alternative to `--cut-\n                                        frame`\n    -d, --dpi \u003cdpi\u003e                     Image resolution. Default `300`\n        --exif \u003cformat\u003e                 Prints exif data. Formatting string. Example: --exif \"{F/2}, {Exp}, ISO {ISO},\n                                        {F}\" Common abbreviations: `F/2`, `Exp`, `ISO`, `F`, `Bias`, `Date`, `Mod`.\n                                        Further, all official exif tags\n        --exif-size \u003csize\u003e              Size of exif font, in arbitrary units. Default: `12px`\n    -f, --filter \u003cfilter\u003e               Filter type for image scaling. One of `(nearest|linear|cubic|gauss|lanczos)`.\n                                        Default: `cubic`\n        --format \u003cw/h\u003e                  Print format `width/height`. Formats in cm are converted to exact print formats\n                                        in inches. Examples: `15cm/10cm`, `6in/4in`, `6000px/4000px`\n        --framed-size \u003cw/h\u003e             Maximum image size, incl. padding\n        --image-size \u003cw/h\u003e              Maximum image size, excl. padding\n        --margins \u003ctp/rt/bm/lt\u003e         Minimum margins around cut marks\n    -o, --output \u003coutput\u003e               Output path. Use `*` as placeholder for the original base file name.\n                                        Used to determine output image type. On Unix systems, this MUST be quoted!\n        --padding \u003ctp/rt/bm/lt\u003e         Padding between image and cut marks\n    -q, --quality \u003cquality\u003e             Image quality for JPEG output in percent. Optional, default `95`\n        --test-pattern \u003csx/gx/sy/gy\u003e    Prints a print control element, with the given square size and gap. Format:\n                                        `\u003csx\u003e/\u003cgx\u003e/\u003csy\u003e/\u003cgy\u003e` or `\u003csize\u003e/\u003cgap\u003e`. Example: `10px/2px/10px/2px`\n```\n\n### `scale`\n\n```\nScale images to absolute or relative size\n\nUSAGE:\n    pprep scale [FLAGS] [OPTIONS] --output \u003coutput\u003e\n\nFLAGS:\n    -h, --help           Prints help information\n        --incremental    Enable incremental scaling. For scaling to small sizes, scales down in multiple steps, to 50%\n                         per step, averaging over 2x2 pixels\n    -V, --version        Prints version information\n\nOPTIONS:\n    -b, --bg \u003cbg\u003e              Background color for `--mode fill`. Default `white`\n    -d, --dpi \u003cdpi\u003e            Image resolution for size not in px. Default `300`\n    -f, --filter \u003cfilter\u003e      Filter type for image scaling. One of `(nearest|linear|cubic|gauss|lanczos)`. Default:\n                               `cubic`\n    -m, --mode \u003cmode\u003e          Scaling mode. Must be given when using `--size` with width and height. One of\n                               `(keep|stretch|crop|fill)`. Default: `keep`\n    -o, --output \u003coutput\u003e      Output path. Use `*` as placeholder for the original base file name.\n                               Used to determine output image type. On Unix systems, this MUST be quoted!\n    -q, --quality \u003cquality\u003e    Image quality for JPEG output in percent. Optional, default `95`\n        --scale \u003cscale\u003e        Output image scale. Use either `--size` or `--scale`. Examples: `0.5`, `50%`, `20%/10%`\n        --size \u003csize\u003e          Output image size. Use either `--size` or `--scale`. Examples: `100px/.`, `./15cm`,\n                               `8in/6in`\n```\n\n### `list`\n\n```\nList files found by input pattern\n\nUSAGE:\n    pprep list [FLAGS]\n\nFLAGS:\n    -a, --absolute    Prints the absolute path\n    -h, --help        Prints help information\n    -p, --path        Prints the full path\n    -V, --version     Prints version information\n```\n\n## Library / crate\n\nTo use this crate as a rust library, add the following to your `Cargo.toml` dependencies section:\n```\nprint-prep = { git = \"https://github.com/mlange-42/print-prep.git\" }\n```\n\n_Warning:_ The API is still incomplete and highly unstable, so be prepared for frequent changes. \nAny help to stabilize the API is highly appreciated.\n\nFor the latest development version, see branch [`dev`](https://github.com/mlange-42/print-prep/tree/dev).\n\n## License\n\n[MIT](LICENSE) \u0026copy; M. Lange","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlange-42%2Fprint-prep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlange-42%2Fprint-prep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlange-42%2Fprint-prep/lists"}