v0.1.7
Big Update
- ❤️ Support converting image from a folder to another folder an keep sub folder file structures now!
- 🐛 Some bug fix
Examples
Convert an common image format to an common image format
if you want to converting images with logs out put, you can use -vv option.
$ icu -vv convert res/img_0.png res/img_0.jpeg --output-format webp`
[2024-02-29T13:05:06Z INFO icu] Start converting files
[2024-02-29T13:05:06Z INFO icu]
[2024-02-29T13:05:06Z INFO icu] took 0.002740s for converting [res/img_0.png] to [res/img_0.webp] with format [WEBP]
[2024-02-29T13:05:06Z INFO icu] took 0.002257s for converting [res/img_0.jpeg] to [res/img_0.webp] with format [WEBP]
[2024-02-29T13:05:06Z INFO icu]
[2024-02-29T13:05:06Z INFO icu] Total converting time:
[2024-02-29T13:05:06Z INFO icu] Consuming : 0.005121s for 2 files
[2024-02-29T13:05:06Z INFO icu] User time: 0.004998s
[2024-02-29T13:05:06Z INFO icu] System time: 0.000123sor in a short form:
$ icu -vv convert res/img_0.png res/img_0.jpeg -F webpConvert some images in a folder to another specific folder
convert all images in the res folder to jpeg format and save them in the res/output folder, if the output file
already exists, it will override it (you should use -r --override-output option).
if and the output folder will keep the same structure as the input folder.
$ icu convert res -O res/output --output-format jpeg --override-outputor in a short form:
$ icu convert res -O res/output -F jpeg -rConvert an LVGL image format to an common image format
Convert an LVGL image format to an common image format.
And if you specify the --overide-output option, ICU will override the output file if it already exists.
And you will get a warning message for sure if the output file already exists.
$ icu -vv convert res/img_0.bin -O res/output -F jpeg -r
[2024-03-03T16:08:01Z INFO icu] Start converting file
[2024-03-03T16:08:01Z INFO icu]
[2024-03-03T16:08:01Z WARN icu] Override output file <res/output/img_0.jpeg> for converting <res/img_0.bin>
[2024-03-03T16:08:01Z INFO icu] took 0.007022s for converting <res/img_0.bin> to <res/output/img_0.jpeg> with format <JPEG>
[2024-03-03T16:08:01Z INFO icu]
[2024-03-03T16:08:01Z INFO icu] Total converting time:
[2024-03-03T16:08:01Z INFO icu] Consuming : 0.008715s for 1 files
[2024-03-03T16:08:01Z INFO icu] User time: 0.007022s
[2024-03-03T16:08:01Z INFO icu] System time: 0.001693s
Convert an common image format to an LVGL image format
Convert an common image format to an LVGL image format, you need to specify the output color format and lvgl version.
But if you don't specify the lvgl version, ICU will use the default version (v9).
$ icu convert res/img_0.png -O res/output -F lvgl -C i8 -rConvert an common image format to an LVGL image format with stride align
Convert an common image format to an LVGL image format with stride align, you need to specify the output color format,
lvgl version, and stride align (default is 1).
4 means the stride of the output image will be 4 bytes aligned.
$ icu convert res/img_0.png -O res/output -F lvgl -C i8 -S 4 -rFull Changelog: v0.1.5...v0.1.7 with ❤️