@@ -88,8 +88,7 @@ Encode an image into `.tex`.
8888
8989``` bash
9090ltk-tex-utils encode \
91- -i path/to/input.png \
92- -o path/to/output.tex \
91+ path/to/input.png \
9392 -f < bc1| bc3| bgra8> \
9493 -m < true| false> \
9594 --mipmap-filter < nearest| triangle| catmullrom| lanczos3>
@@ -98,30 +97,32 @@ ltk-tex-utils encode \
9897Notes:
9998- ` -m/--generate-mipmaps ` defaults to ` true ` . Pass ` -m false ` to disable mipmap generation.
10099- The input image is read via the ` image ` crate and supports common formats like PNG, JPEG, BMP, TIFF, TGA, etc.
100+ - If ` -o/--output ` is not provided, output is written next to the input with the same name and a ` .tex ` extension.
101101
102102Examples:
103103
104104``` bash
105105# BC3 with default mipmaps (triangle)
106- ltk-tex-utils encode -i albedo.png -o albedo.tex -f bc3
106+ ltk-tex-utils encode albedo.png -f bc3
107107
108108# Disable mipmaps
109- ltk-tex-utils encode -i icon.png -o icon.tex -f bgra8 -m false
109+ ltk-tex-utils encode icon.png -f bgra8 -m false
110110
111111# BC1 with a different mipmap filter
112- ltk-tex-utils encode -i mask.png -o mask.tex -f bc1 --mipmap-filter lanczos3
112+ ltk-tex-utils encode mask.png -f bc1 --mipmap-filter lanczos3
113113```
114114
115115#### decode
116116Decode a ` .tex ` file into a standard image.
117117
118118``` bash
119- ltk-tex-utils decode -i path/to/input.tex -o path/to/output.png
119+ ltk-tex-utils decode path/to/input.tex
120120```
121121
122122Notes:
123123- The output image format is inferred from the file extension (e.g., ` .png ` , ` .jpg ` , ` .tiff ` ).
124124- Currently decodes the top-level mip (mip 0).
125+ - If ` -o/--output ` is not provided, output is written next to the input with the same name and a ` .png ` extension.
125126
126127### Supported formats and filters
127128
@@ -145,8 +146,8 @@ Examples:
145146
146147``` bash
147148cargo run -- info -i samples/texture.tex
148- cargo run -- encode -i samples/albedo.png -o out/albedo.tex -f bc3
149- cargo run -- decode -i samples/texture.tex -o out/texture.png
149+ cargo run -- encode samples/albedo.png -f bc3
150+ cargo run -- decode samples/texture.tex
150151```
151152
152153### Acknowledgements
0 commit comments