{"id":24951936,"url":"https://github.com/ocr-d/ocrd_im6convert","last_synced_at":"2025-04-10T12:51:53.877Z","repository":{"id":54782912,"uuid":"138650055","full_name":"OCR-D/ocrd_im6convert","owner":"OCR-D","description":"Run ImageMagick with an OCR-D CLI","archived":false,"fork":false,"pushed_at":"2024-10-01T17:37:11.000Z","size":45,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T11:38:25.815Z","etag":null,"topics":["ocr-d"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCR-D.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-06-25T21:05:18.000Z","updated_at":"2024-10-01T17:37:15.000Z","dependencies_parsed_at":"2025-02-03T01:32:58.007Z","dependency_job_id":"10f0ba1a-f197-49b7-9730-c5d284a4c346","html_url":"https://github.com/OCR-D/ocrd_im6convert","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCR-D%2Focrd_im6convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCR-D%2Focrd_im6convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCR-D%2Focrd_im6convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCR-D%2Focrd_im6convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCR-D","download_url":"https://codeload.github.com/OCR-D/ocrd_im6convert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248220290,"owners_count":21067274,"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":["ocr-d"],"created_at":"2025-02-03T01:32:46.211Z","updated_at":"2025-04-10T12:51:53.870Z","avatar_url":"https://github.com/OCR-D.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ocrd_imageconvert\n\n\u003e Thin wrapper around convert(1)\n\n## Introduction\n\n[ImageMagick's](https://imagemagick.org) `convert` CLI contains a treasure trove of image operations. This wrapper aims to provide much of that as an [OCR-D compliant processor](https://ocr-d.github.io/CLI).\n\n## Installation\n\nThis module requires GNU make (for installation) and the ImageMagick command line tools (at runtime). On Ubuntu 18.04 (or similar), you can install them by running:\n\n    sudo apt-get install make\n    sudo make deps-ubuntu # or: apt-get install imagemagick\n\nMoreover, an installation of [OCR-D core](https://github.com/OCR-D/core) is needed:\n\n    make deps # or: pip install ocrd\n\nThis will install the Python package `ocrd` in your current environment. (Setting up a [venv](https://ocr-d.github.io/docs/guide#python-setup) is strongly recommended.)\n\nLastly, the provided shell script `ocrd-im6convert` works best when copied into your `PATH`, referencing its ocrd-tool.json under a known path. This can be done by running:\n\n    make install\n\nThis will copy the binary and JSON file under `$PREFIX`, which variable you can override to your needs. The default value is to use `PREFIX=$VIRTUAL_ENV` if you have already activated a venv, or `PREFIX=$PWD/.local` (i.e. under the current working directory).\n\n## Usage\n\nThis package provides `ocrd-im6convert` as a [OCR-D processor](https://ocr-d.github.com/cli) (command line interface). It uses the following parameters:\n\n```JSON\n    \"ocrd-im6convert\": {\n      \"executable\": \"ocrd-im6convert\",\n      \"categories\": [\"Image preprocessing\"],\n      \"steps\": [\"preprocessing/optimization\"],\n      \"description\": \"Convert and transform images\",\n      \"input_file_grp\": [\n        \"OCR-D-IMG\"\n      ],\n      \"output_file_grp\": [\n        \"OCR-D-IMG\"\n      ],\n      \"parameters\": {\n        \"input-options\": {\n          \"type\": \"string\",\n          \"description\": \"e.g. -density 600x600 -wavelet-denoise 1%x0.1\",\n          \"default\": \"\"\n        },\n        \"output-format\": {\n          \"type\": \"string\",\n          \"description\": \"Desired media type of output\",\n          \"required\": true,\n          \"enum\": [\"image/tiff\", \"image/jp2\", \"image/png\"]\n        },\n        \"output-options\": {\n          \"type\": \"string\",\n          \"description\": \"e.g. -resample 300x300 -alpha deactivate -normalize -despeckle -noise 2 -negate -morphology close diamond\",\n          \"default\": \"\"\n        }\n      }\n    }\n```\n\nCf. [IM documentation](https://imagemagick.org/script/command-line-options.php) or man-page `convert(1)` for formats and options.\n\n### Example\n\n    ocrd-im6convert -I OCR-D-IMG -O OCR-D-IMG-SMALL -p '{ \"output-format\": \"image/png\", \"output-options\": \"-resize 24%\" }'\n\n(This downscales the images in the input file group `OCR-D-IMG` to 24% and stores them as PNG files under the output file group `OCR-D-IMG-SMALL`.)\n\n## Testing\n\nNone yet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focr-d%2Focrd_im6convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focr-d%2Focrd_im6convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focr-d%2Focrd_im6convert/lists"}