{"id":17882353,"url":"https://github.com/mgjules/batimag","last_synced_at":"2025-03-22T12:32:26.554Z","repository":{"id":65839876,"uuid":"601125121","full_name":"mgjules/batimag","owner":"mgjules","description":"Batch image processing done simply.","archived":false,"fork":false,"pushed_at":"2023-12-04T00:53:41.000Z","size":121,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T12:58:59.875Z","etag":null,"topics":["cli","golang","image-processing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mgjules.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":"2023-02-13T12:26:22.000Z","updated_at":"2023-10-06T19:16:46.000Z","dependencies_parsed_at":"2024-06-21T11:57:56.164Z","dependency_job_id":null,"html_url":"https://github.com/mgjules/batimag","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.1578947368421053,"last_synced_commit":"a5c1f692716cc9ab89a8ad22625398be97c988f4"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgjules%2Fbatimag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgjules%2Fbatimag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgjules%2Fbatimag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgjules%2Fbatimag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgjules","download_url":"https://codeload.github.com/mgjules/batimag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221829437,"owners_count":16887594,"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":["cli","golang","image-processing"],"created_at":"2024-10-28T12:52:02.191Z","updated_at":"2024-10-28T12:52:02.958Z","avatar_url":"https://github.com/mgjules.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batimag\n\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/mgjules/batimag)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE)\n\nBatimag is short for Batch Imager which applies basic image processing functions to a batch of images in a specific directory recursively.\n\nJPG/JPEG, GIF, PNG, TIF/TIFF, BMP and WEBP images are supported.\n\n\n## Installation\n\n### From Source (recommended)\n\n```shell\ngo install github.com/mgjules/batimag@v0.1.3\n```\n\n### From Binary\n\nDownload the corresponding binary for your operating system and architecture from the [releases](https://github.com/mgjules/batimag/releases) page and place it in a `$PATH` directory.\n\n## Usage\n\n```shell\n❯ batimag\nNAME:\n   batimag - Batch Image Processor!\n\nUSAGE:\n   batimag [global options] command [command options] [arguments...]\n\nDESCRIPTION:\n   Batimag applies a set of image processing functions to images in a given directory recursively.\n\nAUTHOR:\n   Michaël Giovanni Jules \u003cjulesmichaelgiovanni@gmail.com\u003e\n\nCOMMANDS:\n   process     Process some images!\n   version, v  Shows the version\n   help, h     Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h  show help\n\nCOPYRIGHT:\n   (c) 2023 Michaël Giovanni Jules\n```\n\n```shell\n❯ batimag help process\nNAME:\n   batimag process - Process some images!\n\nUSAGE:\n   batimag process [command options] [arguments...]\n\nOPTIONS:\n   --debug              run in debug mode (default: false)\n   --clean              remove images in output directory (default: false)\n   --config-path value  path to config file (default: config.yml)\n   --help, -h           show help\n```\n\n### Example usage\n\nRun batimag using the default configuration file `config.yml`.\n\n```shell\nbatimag process --clean --debug\n```\n\n## Configuration\n\nExample configuration (see [config.example.yml](config.example.yml)):\n\n```yaml\ninput_dir: \"./samples/input\"\noutput_dir: \"./samples/output\"\nresize:\n  # Desired width in pixels.\n  # Zero value will resize image proportionally to height.\n  # Default value: 0.\n  width: 100\n  # Desired height in pixels.\n  # Zero value will resize image proportionally to width.\n  # Default value: 0.\n  height: 50\n  # Whether to upscale.\n  # Default value: false.\n  upscale: true\n  # Resize type.\n  # Accepted values: Normal, Thumbnail, Fit and Fill.\n  # Default value: Normal.\n  type: Normal\n  # Resize resampling filter.\n  # Accepted values: Lanczos, CatmullRom, MitchellNetravali, Linear, Box and NearestNeighbor.\n  # Default value: Lanczos.\n  filter: Lanczos\n  # Anchor is used for image alignment when using Resize Type 'Fill'.\n  # Accepted values: Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom and BottomRight.\n  # Default value: Center.\n  anchor: Center\ntransform:\n  # Automatically fix orientation after processing.\n  # Default value: false.\n  auto_orientation: true\n  # Rotate clockwise by certain angle in degrees.\n  # Accepted values: 0 90 180 270.\n  # Default value: 0.\n  rotate: 90\n  # Flip on a certain axis.\n  # Accepted values: Vertical and Horizontal.\n  # Default value: None.\n  flip: Vertical\neffect:\n  # Strength of the gaussian blur effect.\n  # Accepted values: 0.0 to 5.0.\n  # Default value: 0.\n  gaussian_blur: 2.0\n  # Strength of the sharpening effect.\n  # Accepted values: 0.0 to 5.0.\n  # Default value: 0.\n  sharpen: 1.0\nadjust:\n  # Gamma correction.\n  # Accepted values: 0.0 to 5.0.\n  # Values less that 1.0 are darker while values greater than 1.0 are lighter.\n  # Default value: 0.\n  gamma: 0.5\n  # Percentage value.\n  # Accepted values: -100 to 100.\n  # Negative values are grayer.\n  # Default value: 0.\n  contrast: 50\n  # Percentage value.\n  # Accepted values: -100 to 100.\n  # Lower negative values are darker while higher positive values are lighter.\n  # Default value: 0.\n  brightness: 50\n  # Percentage value.\n  # Accepted values: -100 to 100.\n  # Negative values decrease image saturation while positive values increase image saturation.\n  # Default value: 0.\n  saturation: 50\n  # Grayscale version.\n  # Default value: false.\n  grayscale: true\n```\n\n## Credits\n\n- [github.com/disintegration/imaging](https://github.com/disintegration/imaging) - Image processing functions.\n- [github.com/chai2010/webp](https://github.com/chai2010/webp) - Webp support.\n- [github.com/sourcegraph/conc](https://github.com/sourcegraph/conc) - Concurrency made easy.\n- [github.com/mcuadros/go-defaults](https://github.com/mcuadros/go-defaults) - Struct default values.\n- [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) - Struct validation.\n- [github.com/urfave/cli/v2](https://github.com/urfave/cli) - CLI.\n\n## Stability\n\nThis project follows [SemVer](http://semver.org/) strictly and is not yet `v1`.\n\nBreaking changes might be introduced until `v1` is released.\n\nThis project follows the [Go Release Policy](https://golang.org/doc/devel/release.html#policy). Each major version of Go is supported until there are two newer major releases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgjules%2Fbatimag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgjules%2Fbatimag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgjules%2Fbatimag/lists"}