Skip to content

Commit 73a694f

Browse files
committed
πŸ“„(README): update readme and versions
1 parent 801c558 commit 73a694f

4 files changed

Lines changed: 94 additions & 59 deletions

File tree

β€ŽCargo.tomlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "icu_tool"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55
authors = ["Benign X", "W-Mai"]
66
homepage = "https://github.com/W-Mai/icu"
@@ -14,7 +14,7 @@ name = "icu"
1414
path = "src/main.rs"
1515

1616
[dependencies]
17-
icu_lib = { version = "0.1.0" }
17+
icu_lib = { version = "0.1.1" }
1818
clap = { version = "4.4.18", features = ["derive", "suggestions"] }
1919
eframe = { version = "0.26.0", features = ["glow"] }
2020
egui_plot = "0.26.0"

β€ŽREADME.mdβ€Ž

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,21 @@ written in RUST.
1515
- Supports LVGL binary format
1616
- Supports preview a wide range of image formats and LVGL binary format
1717

18-
# How to build
18+
# How to install
19+
20+
ICU is written in RUST, so you need to have the RUST environment installed on your system.
21+
22+
```shell
23+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
24+
```
25+
26+
After that, you can install ICU by running the following command:
27+
28+
```shell
29+
cargo install icu_tool
30+
```
31+
32+
# How to build yourself
1933

2034
```shell
2135
cargo build --release
@@ -60,58 +74,3 @@ icu show res/img_0.bin -f lvgl-v9
6074

6175
And you will get a window with the image like before.
6276

63-
# How to use
64-
65-
```rust
66-
use icu_lib::endecoder::{common, lvgl_v9};
67-
use icu_lib::midata::MiData;
68-
use icu_lib::EncoderParams;
69-
use std::fs;
70-
71-
fn main() {
72-
const DATA: &[u8] = include_bytes!("../res/img_0.png");
73-
74-
// Decode the image data and automatically detect the format
75-
let mid = MiData::decode_from::<common::AutoDectect>(Vec::from(DATA));
76-
77-
// Encode the image data to the LVGL binary format with ARGB8888 color format
78-
let data = mid.encode_into::<lvgl_v9::ColorFormatARGB8888>(
79-
EncoderParams {
80-
stride_align: 256,
81-
dither: false,
82-
});
83-
84-
fs::write("img_0.bin", data).expect("Unable to write file");
85-
}
86-
```
87-
88-
# Architecture
89-
90-
```text
91-
╔═══════════════╗
92-
β•‘ β•‘
93-
β•‘ β•‘
94-
β”Œ ─ ─ ─ ─ ─ ─ ┐ β•‘
95-
β”Œ ─ ─ ─ ─ ┐ β•‘
96-
β”‚ EnDecoder β”‚ β–Ό
97-
β”” ─ ─ ─ ─ β”˜ β”Œ ─ ─ ─ ─ ─ ─ ┐
98-
β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ β”Œ ─ ─ ─ ─ ┐
99-
β”‚ PNG β”‚ β”‚ MidData β”‚
100-
β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β”” ─ ─ ─ ─ β”˜
101-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
102-
β”‚β”‚ JPEG β”‚β”‚ β”‚ ARGB β”‚
103-
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β•”-------------β•—
104-
β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β•‘ ICU_LIB β•‘
105-
β”‚ SVG β”‚ β”‚β”‚ PATH β”‚β”‚ β•š-------------╝
106-
β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
107-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚β”Œβ”€β”€ ─── ─── ┐│
108-
β”‚β”‚ LVGL BIN β”‚β”‚ CUSTOM β”‚
109-
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ │└── ─── ─── β”˜β”‚
110-
β”‚β”Œβ”€β”€ ─── ─── ┐│ ─ ─ ─ ─ ─ ─ ─
111-
CUSTOM β”‚ β•‘
112-
│└── ─── ─── β”˜β”‚ β•‘
113-
─ ─ ─ ─ ─ ─ ─ β•‘
114-
β–² β•‘
115-
β•‘ β•‘
116-
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
117-
```

β€Žicu_lib/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "icu_lib"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55
authors = ["Benign X", "W-Mai"]
66
homepage = "https://github.com/W-Mai/icu"

β€Žicu_lib/README.mdβ€Ž

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# ICU-LIB
2+
3+
Image Converter Ultra Library (ICU-LIB)
4+
5+
# Introduction
6+
7+
The Image Converter Ultra (ICU) is a software that converts images from one format to another. It is designed to be a
8+
versatile tool that can handle a wide range of image formats and convert them to other formats. The ICU is designed to
9+
be a standalone application that can be used on any platform that supports the necessary dependencies. The ICU is
10+
written in RUST.
11+
12+
# Features
13+
14+
- Supports a wide range of image formats
15+
- Supports LVGL binary format
16+
- Supports preview a wide range of image formats and LVGL binary format
17+
18+
# How to use
19+
20+
```shell
21+
cargo add icu_lib
22+
```
23+
24+
```rust
25+
use icu_lib::endecoder::{common, lvgl_v9};
26+
use icu_lib::midata::MiData;
27+
use icu_lib::EncoderParams;
28+
use std::fs;
29+
30+
fn main() {
31+
const DATA: &[u8] = include_bytes!("../res/img_0.png");
32+
33+
// Decode the image data and automatically detect the format
34+
let mid = MiData::decode_from::<common::AutoDectect>(Vec::from(DATA));
35+
36+
// Encode the image data to the LVGL binary format with ARGB8888 color format
37+
let data = mid.encode_into::<lvgl_v9::ColorFormatARGB8888>(
38+
EncoderParams {
39+
stride_align: 256,
40+
dither: false,
41+
});
42+
43+
fs::write("img_0.bin", data).expect("Unable to write file");
44+
}
45+
```
46+
47+
# Architecture
48+
49+
```text
50+
╔═══════════════╗
51+
β•‘ β•‘
52+
β•‘ β•‘
53+
β”Œ ─ ─ ─ ─ ─ ─ ┐ β•‘
54+
β”Œ ─ ─ ─ ─ ┐ β•‘
55+
β”‚ EnDecoder β”‚ β–Ό
56+
β”” ─ ─ ─ ─ β”˜ β”Œ ─ ─ ─ ─ ─ ─ ┐
57+
β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ β”Œ ─ ─ ─ ─ ┐
58+
β”‚ PNG β”‚ β”‚ MidData β”‚
59+
β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β”” ─ ─ ─ ─ β”˜
60+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
61+
β”‚β”‚ JPEG β”‚β”‚ β”‚ ARGB β”‚
62+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β•”-------------β•—
63+
β”‚β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β•‘ ICU_LIB β•‘
64+
β”‚ SVG β”‚ β”‚β”‚ PATH β”‚β”‚ β•š-------------╝
65+
β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
66+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚β”Œβ”€β”€ ─── ─── ┐│
67+
β”‚β”‚ LVGL BIN β”‚β”‚ CUSTOM β”‚
68+
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ │└── ─── ─── β”˜β”‚
69+
β”‚β”Œβ”€β”€ ─── ─── ┐│ ─ ─ ─ ─ ─ ─ ─
70+
CUSTOM β”‚ β•‘
71+
│└── ─── ─── β”˜β”‚ β•‘
72+
─ ─ ─ ─ ─ ─ ─ β•‘
73+
β–² β•‘
74+
β•‘ β•‘
75+
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
76+
```

0 commit comments

Comments
Β (0)