{"id":21929944,"url":"https://github.com/w-mai/icu","last_synced_at":"2025-04-19T18:53:04.243Z","repository":{"id":220252607,"uuid":"750274725","full_name":"W-Mai/icu","owner":"W-Mai","description":"Image Converter Ultra","archived":false,"fork":false,"pushed_at":"2025-01-14T04:03:24.000Z","size":1311,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T13:09:47.097Z","etag":null,"topics":["cli-tool","image-converter","image-processing","lvgl","rust"],"latest_commit_sha":null,"homepage":"https://w-mai.github.io/icu/","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/W-Mai.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":"2024-01-30T10:28:12.000Z","updated_at":"2025-03-23T10:43:54.000Z","dependencies_parsed_at":"2024-03-12T13:55:10.355Z","dependency_job_id":"070a9b55-6e61-45cd-9597-a9abf3f9b231","html_url":"https://github.com/W-Mai/icu","commit_stats":null,"previous_names":["w-mai/icu"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Mai%2Ficu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Mai%2Ficu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Mai%2Ficu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/W-Mai%2Ficu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/W-Mai","download_url":"https://codeload.github.com/W-Mai/icu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249769868,"owners_count":21323067,"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-tool","image-converter","image-processing","lvgl","rust"],"created_at":"2024-11-28T23:06:34.999Z","updated_at":"2025-04-19T18:53:04.237Z","avatar_url":"https://github.com/W-Mai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ICU\n\nImage Converter Ultra\n\n# Introduction\n\nThe Image Converter Ultra (ICU) is a software that converts images from one format to another. It is designed to be a\nversatile tool that can handle a wide range of image formats and convert them to other formats. The ICU is designed to\nbe a standalone application that can be used on any platform that supports the necessary dependencies. The ICU is\nwritten in RUST.\n\n# Features\n\n- Supports a wide range of image formats\n- Supports LVGL binary format\n- Supports preview a wide range of image formats and LVGL binary format\n\n# How to install\n\nICU is a standalone application that can be installed on any platform that supports the necessary dependencies.\n\n- **Homebrew**\n\n```shell\nbrew install W-Mai/homebrew-cellar/icu_tool\n```\n\nor\n\n```shell\nbrew tap W-Mai/homebrew-cellar\nbrew install icu_tool\n```\n\n- **PowerShell**\n\n```powershell\npowershell -c \"irm https://github.com/W-Mai/icu/releases/latest/download/icu_tool-installer.ps1 | iex\"\n```\n\n- **Shell**\n\n```shell\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/W-Mai/icu/releases/latest/download/icu_tool-installer.sh | sh\n```\n\n- **Windows MSI Installer**\n\nDownload the latest `Windows MSI Installer` from the [releases page](https://github.com/W-Mai/icu/releases/latest) and\ninstall it.\n\n- **Cargo**\n\nICU is written in RUST, so you need to have the RUST environment installed on your system.\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nAfter that, you can install ICU by running the following command:\n\n```shell\ncargo install icu_tool\n```\n\n# How to use auto-completion feature\n\nICU supports auto-completion feature for shells like `bash`, `zsh`, `fish` and `powershell`.\n\n- **Bash**\n\nAdd the following line to your `.bashrc` or `.bash_profile` file:\n\n```shell\neval \"$(icu -I bash)\"\n```\n\n- **Zsh**\n\nAdd the following line to your `.zshrc` file:\n\n```shell\neval \"$(icu -I zsh)\"\n```\n\n- **Fish**\n\nAdd the following line to your `config.fish` file:\n\n```shell\nicu -I fish | source\n```\n\n# How to build yourself\n\n```shell\ngit clone https://github.com/W-Mai/icu.git\ncd icu\ncargo build --release\n```\n\n# How to use\n\n```shell\n$ icu -h\n\n`Show` or `Convert` image files to any other image format including LVGL image formats.\n\nUsage: icu [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  info     Show some information about an image file\n  show     Show an image file\n  convert  Convert image files to any other image format including LVGL image formats\n  help     Print this message or the help of the given subcommand(s)\n\nOptions:\n  -v, --verbose...  verbose mode\n  -h, --help        Print help\n  -V, --version     Print version\n\n```\n\n```shell\n$ icu info -h\n\nShow some information about an image file\n\nUsage: icu info [OPTIONS] \u003cFILE\u003e\n\nArguments:\n  \u003cFILE\u003e  an image file to show\n\nOptions:\n  -f, --input-format \u003cINPUT_FORMAT\u003e  input image formats [default: auto] [possible values: auto, common, lvgl-v9]\n  -h, --help                         Print help (see more with '--help')\n\n```\n\n```shell\nicu convert -h\n\nConvert image files to any other image format including LVGL image formats\n\nUsage: icu convert [OPTIONS] --output-format \u003cOUTPUT_FORMAT\u003e \u003cINPUT_FILES\u003e...\n\nArguments:\n  \u003cINPUT_FILES\u003e...  input files\n\nOptions:\n  -f, --input-format \u003cINPUT_FORMAT\u003e\n          input image formats [default: auto] [possible values: auto, common, lvgl-v9]\n  -O, --output-folder \u003cOUTPUT_FOLDER\u003e\n          output folder\n  -r, --override-output\n          override exist output files, and you will get a warning message for sure if the output file already exists\n  -G, --output-category \u003cOUTPUT_CATEGORY\u003e\n          output image format categories [default: common] [possible values: common, bin, c-array]\n  -F, --output-format \u003cOUTPUT_FORMAT\u003e\n          output image formats [possible values: png, jpeg, bmp, gif, tiff, webp, ico, pbm, pgm, ppm, pam, lvgl]\n  -S, --output-stride-align \u003cOUTPUT_STRIDE_ALIGN\u003e\n          stride of the output image [default: 1]\n  -C, --output-color-format \u003cOUTPUT_COLOR_FORMAT\u003e\n          output color formats [possible values: rgb565, rgb565a8, rgb888, argb8888, xrgb8888, a1, a2, a4, a8, l8, i1, i2, i4, i8]\n      --dither \u003cDITHER\u003e\n          dither the output image so that it will look better on screens with low color depth 1 to 30, 1 is the best quality and 30 is the worst quality. 10 is recommended\n      --lvgl-version \u003cLVGL_VERSION\u003e\n          LVGL Version, needed if [`ImageFormats`] is [`ImageFormats::LVGL`] [default: v9] [possible values: v9, v8]\n  -h, --help\n          Print help (see more with '--help')\n```\n\n```shell\n$ icu show -h\n\nShow an image file\n\nUsage: icu show [OPTIONS] \u003cFILE\u003e\n\nArguments:\n  \u003cFILE\u003e  an image file to show\n\nOptions:\n  -f, --input-format \u003cINPUT_FORMAT\u003e  input image formats [default: auto] [possible values: auto, common, lvgl-v9]\n  -h, --help                         Print help (see more with '--help')\n```\n\n# Example\n\n## Show an common image format\n\n```shell\nicu show res/img_0.png\n```\n\nYou will get a window with the image.\n\n\u003cimg src=\"static/snapshots/snapshot_1.png\" width=\"800\"\u003e\n\n## Show an LVGL image format\n\n* You don't need to specify the input format, because ICU can detect it automatically. *\n\n```shell\nicu show res/img_0.bin\n```\n\nAnd you will get a window with the image like before.\n\n## Convert an common image format to an common image format\n\nif you want to converting images with logs out put, you can use `-vv` option.\n\n```shell\n$ icu -vv convert res/img_0.png res/img_0.jpeg --output-format webp`\n\n[2024-02-29T13:05:06Z INFO  icu] Start converting files\n[2024-02-29T13:05:06Z INFO  icu] \n[2024-02-29T13:05:06Z INFO  icu] took 0.002740s for converting [res/img_0.png] to [res/img_0.webp] with format [WEBP] \n[2024-02-29T13:05:06Z INFO  icu] took 0.002257s for converting [res/img_0.jpeg] to [res/img_0.webp] with format [WEBP] \n[2024-02-29T13:05:06Z INFO  icu] \n[2024-02-29T13:05:06Z INFO  icu] Total converting time:\n[2024-02-29T13:05:06Z INFO  icu]        Consuming  : 0.005121s for 2 files\n[2024-02-29T13:05:06Z INFO  icu]        User   time: 0.004998s\n[2024-02-29T13:05:06Z INFO  icu]        System time: 0.000123s\n```\n\nor in a short form:\n\n```shell\n$ icu -vv convert res/img_0.png res/img_0.jpeg -F webp\n```\n\n## Convert some images in a folder to another specific folder\n\nconvert all images in the `res` folder to jpeg format and save them in the `res/output` folder, if the output file\nalready exists, it will override it (you should use `-r --override-output` option).\n\n*if and the output folder will keep the same structure as the input folder*.\n\n```shell\n$ icu convert res -O res/output --output-format jpeg --override-output\n```\n\nor in a short form:\n\n```shell\n$ icu convert res -O res/output -F jpeg -r\n```\n\n## Convert an LVGL image format to an common image format\n\nConvert an LVGL image format to an common image format.\nAnd if you specify the `--overide-output` option, ICU will override the output file if it already exists.\nAnd you will get a warning message for sure if the output file already exists.\n\n```shell\n$ icu -vv convert res/img_0.bin -O res/output -F jpeg -r\n\n[2024-03-03T16:08:01Z INFO  icu] Start converting file\n[2024-03-03T16:08:01Z INFO  icu] \n[2024-03-03T16:08:01Z WARN  icu] Override output file \u003cres/output/img_0.jpeg\u003e for converting \u003cres/img_0.bin\u003e\n[2024-03-03T16:08:01Z INFO  icu] took 0.007022s for converting \u003cres/img_0.bin\u003e to \u003cres/output/img_0.jpeg\u003e with format \u003cJPEG\u003e\n[2024-03-03T16:08:01Z INFO  icu] \n[2024-03-03T16:08:01Z INFO  icu] Total converting time:\n[2024-03-03T16:08:01Z INFO  icu]        Consuming  : 0.008715s for 1 files\n[2024-03-03T16:08:01Z INFO  icu]        User   time: 0.007022s\n[2024-03-03T16:08:01Z INFO  icu]        System time: 0.001693s\n\n```\n\n## Convert an common image format to an LVGL image format\n\nConvert an common image format to an LVGL image format, you need to specify the output color format and lvgl version.\nBut if you don't specify the lvgl version, ICU will use the default version (v9).\n\n```shell\n$ icu convert res/img_0.png -O res/output -F lvgl -C i8 -r\n```\n\n## Convert an common image format to an LVGL image format with stride align\n\nConvert an common image format to an LVGL image format with stride align, you need to specify the output color format,\nlvgl version, and stride align (default is 1).\n\n***4** means the stride of the output image will be 4 bytes aligned.*\n\n```shell\n$ icu convert res/img_0.png -O res/output -F lvgl -C i8 -S 4 -r\n```\n\n## License\n\nICU is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-mai%2Ficu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw-mai%2Ficu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw-mai%2Ficu/lists"}