1+ <div align =" center " >
2+
13# ![ bitmap_type_tracer] ( ./logo.png )
24![ Crates.io] ( https://img.shields.io/crates/v/bitmap_type_tracer )
35![ Crates.io] ( https://img.shields.io/crates/d/bitmap_type_tracer )
6+ ![ GitHub issues] ( https://img.shields.io/github/issues/tolik518/bitmap_type_tracer )
7+ ![ GitHub pull requests] ( https://img.shields.io/github/issues-pr/tolik518/bitmap_type_tracer )
8+
9+ ` bitmap_type_tracer ` is a utility tool, written in Rust, for generating text-images using a provided bitmap-font (and a set of configuration parameters).
410
5- ` bitmap_type_tracer ` is a utility tool for generating text-images using a provided bitmap-font (and a set of configuration parameters).
11+ </ div >
612
713## Features
814- Generate images from a font bitmap using a custom sequence and text.
@@ -74,6 +80,8 @@ This command will generate an image using a previously saved font configuration
7480
7581- ` --save-json ` : Save the provided configuration as a JSON file, making it easier to reuse in the future.
7682
83+ - ` --lang en|it|fr|en ` : Specify the language of the text. Default is your System language if supported, otherwise its set to en.
84+
7785## Modules
7886
7987- ` main.rs ` : The main driver of the application, handling command line arguments and invoking image generation.
@@ -87,89 +95,95 @@ This command will generate an image using a previously saved font configuration
8795_ /examples/4138906397_0dc616813b_o.png_
8896![ ] ( ./examples/4138906397_0dc616813b_o.png )
8997``` bash
90- bitmap_font_tool examples/4138906397_0dc616813b_o.png " \!\" '()*+,-.\\ 0123456789:; = ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 10
98+ bitmap_type_tracer examples/4138906397_0dc616813b_o.png " \!\" '()*+,-.\\ 0123456789:; = ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 10
9199```
92- ![ ] ( ./ examples/4138906397_0dc616813b_o.png_tolik518.png)
100+ ![ ] ( examples/outputs /4138906397_0dc616813b_o.png_tolik518.png )
93101
94102---------------------------------------
95103
96104_ /examples/4138906425_29cbc92641_o.png_
97105![ ] ( ./examples/4138906425_29cbc92641_o.png )
98106``` bash
99- bitmap_font_tool examples/4138906425_29cbc92641_o.png " \!\" '()*+,-.\\ 0123456789:; = ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 10
107+ bitmap_type_tracer examples/4138906425_29cbc92641_o.png " \!\" '()*+,-.\\ 0123456789:; = ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 10
100108```
101- ![ ] ( ./ examples/4138906425_29cbc92641_o.png_tolik518.png)
109+ ![ ] ( examples/outputs /4138906425_29cbc92641_o.png_tolik518.png )
102110
103111---------------------------------------
104112
105113_ /examples/FONT34.png_
106114![ ] ( ./examples/FONT34.png )
107115``` bash
108- bitmap_font_tool examples/FONT34.png " \! () , . 0123456789:; - ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 20 --bottom 150 --threshold 20
116+ bitmap_type_tracer examples/FONT34.png " \! () , . 0123456789:; - ? ABCDEFGHIJKLMNOPQRSTUVWXYZ " tolik518 20 --bottom 150 --threshold 20
109117```
110- ![ ] ( ./ examples/FONT34.png_tolik518.png)
118+ ![ ] ( examples/outputs /FONT34.png_tolik518.png )
111119
112120---------------------------------------
113121
114122_ /examples/font228.png_
115123![ ] ( ./examples/font228.png )
116124``` bash
117- bitmap_font_tool examples/font228.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ>.: " tolik518 10 --threshold 0
125+ bitmap_type_tracer examples/font228.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ>.: " tolik518 10 --threshold 0
118126```
119127Since the number are missing from the sequence, they are not generated in the image and it tries to fill the space with the background.
120128The background was not recognized properly, so it was filled with the brown instead of black.
121- ![ ] ( ./ examples/font228.png_tolik518.png)
129+ ![ ] ( examples/outputs /font228.png_tolik518.png )
122130
123131---------------------------------------
124132
125133_ /examples/font239r.png_
126134![ ] ( ./examples/font239r.png )
127135``` bash
128- bitmap_font_tool examples/font239r.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ()\!?.,’ " tolik518 7 --bottom 4 --threshold 1
136+ bitmap_type_tracer examples/font239r.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ()\!?.,’ " tolik518 7 --bottom 4 --threshold 1
129137```
130138Since the number are missing from the sequence, they are not generated in the image and it tries to fill the space with the background, but the threshold is set to 1, so it doesn't fill the space with the transparent background since it recognized the black background.
131- ![ ] ( ./ examples/font239r.png_tolik518.png)
139+ ![ ] ( examples/outputs /font239r.png_tolik518.png )
132140
133141---------------------------------------
134142
135143_ /examples/font244r.png_
136144![ ] ( ./examples/font244r.png )
137145``` bash
138- bitmap_font_tool examples/font244r.png " ALW6BMX7CNY8DOZ9EP*\!FQ0?GR1.HS2 IT3 JU4 KV5 " tolik518 4 --threshold 30
146+ bitmap_type_tracer examples/font244r.png " ALW6BMX7CNY8DOZ9EP*\!FQ0?GR1.HS2 IT3 JU4 KV5 " tolik518 4 --threshold 30
139147```
140148We needed a threshold of 30 to remove the black background.
141- ![ ] ( ./ examples/font244r.png_tolik518.png)
149+ ![ ] ( examples/outputs /font244r.png_tolik518.png )
142150
143151---------------------------------------
144152
145153_ /examples/font248r.png_
146154![ ] ( ./examples/font248r.png )
147155``` bash
148- bitmap_font_tool examples/font248r.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \!?." tolik518 20 --threshold 60
156+ bitmap_type_tracer examples/font248r.png " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \!?." tolik518 20 --threshold 60
149157```
150158To have a better result, we needed a threshold of 60 to remove the black background.
151- ![ ] ( ./ examples/font248r.png_tolik518.png)
159+ ![ ] ( examples/outputs /font248r.png_tolik518.png )
152160
153161---------------------------------------
154162
155163_ /examples/MEGAD.png_
156164![ ] ( ./examples/MEGAD.png )
157165``` bash
158- bitmap_font_tool examples/MEGAD.png " '() +,-. 0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ ! =? " tolik518 10 --bottom 10 --threshold 1
166+ bitmap_type_tracer examples/MEGAD.png " '() +,-. 0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ ! =? " tolik518 10 --bottom 10 --threshold 1
159167```
160168In this example, we needed to add a bottom margin of 10 for the characters to align properly.
161- ![ ] ( ./ examples/MEGAD.png_tolik518.png)
169+ ![ ] ( examples/outputs /MEGAD.png_tolik518.png )
162170
163171---------------------------------------
164172
165173_ /examples/MEGAD2.png_
166174![ ] ( ./examples/MEGAD2.png )
167175``` bash
168- bitmap_font_tool examples/MEGAD2.png " AGMSY+:4BHNTZ\!;5CIOU.?06DJPV;(17EKQW\" )28FLRX-'39" tolik518 8 --bottom 3 --threshold 1
176+ bitmap_type_tracer examples/MEGAD2.png " AGMSY+:4BHNTZ\!;5CIOU.?06DJPV;(17EKQW\" )28FLRX-'39" tolik518 8 --bottom 3 --threshold 1
169177```
170- ![ ] ( ./ examples/MEGAD2.png_tolik518.png)
178+ ![ ] ( examples/outputs /MEGAD2.png_tolik518.png )
171179
172180
173181## Contributions
174182
175183Feel free to contribute by opening issues or pull requests. All feedback is welcome!
184+
185+ <div align =" center " >
186+
187+ ![ Rust love] ( https://www.gstatic.com/android/keyboard/emojikitchen/20220506/u1f498/u1f498_u1f980.png )
188+
189+ </div >
0 commit comments