Skip to content

Releases: W-Mai/icu

v0.1.7

Choose a tag to compare

@W-Mai W-Mai released this 03 Mar 16:28
af86a9e

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.000123s

or in a short form:

$ icu -vv convert res/img_0.png res/img_0.jpeg -F webp

Convert 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-output

or in a short form:

$ icu convert res -O res/output -F jpeg -r

Convert 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 -r

Convert 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 -r

Full Changelog: v0.1.5...v0.1.7 with ❤️

v0.1.5

Choose a tag to compare

@W-Mai W-Mai released this 29 Feb 17:44
949b000

Big Updating

  • Add can_decode interface for EnDecoder in icu_lib
  • Support auto detect image format for input image files
  • Simplify argument inputs

Easy to install

cargo install icu_tool

Full Changelog: v0.1.4...v0.1.5 with ❤️

v0.1.4

Choose a tag to compare

@W-Mai W-Mai released this 29 Feb 13:12
7af2b72

Big Updating

  • 🚧 Refactor icu input args
  • 🚧 Refactor icu_lib conversion structure
  • 📄 Support conversion time log
    • with option -vv like icu -vv convert res/img_0.png res/img_0.jpeg --output-format webp

peace&love ❤️

Full Changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@W-Mai W-Mai released this 28 Feb 07:56
cacfedc
  • add color picker support

Full Changelog: v0.1.1...v0.1.3

v0.1.1

Choose a tag to compare

@W-Mai W-Mai released this 05 Feb 21:10
71a79a2

Support Render Image in a preview window

icu xxxx

Easy to install

cargo install icu_tool

Full Changelog: v0.1.0...v0.1.1

First Release

Choose a tag to compare

@W-Mai W-Mai released this 05 Feb 12:04
403868b

ICU

Image Converter Ultra

Introduction

The Image Converter Ultra (ICU) is a software that converts images from one format to another. It is designed to be a
versatile tool that can handle a wide range of image formats and convert them to other formats. The ICU is designed to
be a standalone application that can be used on any platform that supports the necessary dependencies. The ICU is
written in RUST.

Features

  • Supports a wide range of image formats
  • Supports LVGL binary format

How to use

use icu_lib::endecoder::{common, lvgl_v9};
use icu_lib::midata::MiData;
use icu_lib::EncoderParams;
use std::fs;

fn main() {
    const DATA: &[u8] = include_bytes!("../res/img_0.png");

    // Decode the image data and automatically detect the format
    let mid = MiData::decode_from::<common::AutoDectect>(Vec::from(DATA));

    // Encode the image data to the LVGL binary format with ARGB8888 color format
    let data = mid.encode_into::<lvgl_v9::ColorFormatARGB8888>(
        EncoderParams {
            stride_align: 256,
            dither: false,
        });

    fs::write("img_0.bin", data).expect("Unable to write file");
}

What's Changed

  • 🐛(lvgl_v9): fix IA1/2/4/8 color convert minor color error problem by @W-Mai in #1
  • ✨(lvgl_v9): performance improvement and optimization by @W-Mai in #2

New Contributors

  • @W-Mai made their first contribution in #1

Full Changelog: https://github.com/W-Mai/icu/commits/v0.1.0