First of all, I'm just not happy with current structure of project. There's literally 3 (and could be more) separate binaries that all do almost the same thing but differently. That's not ideal.
Second reason is that there's a lot of code dublication, and refactoring all of that will be such a pain in the ass for me.
Third reason is that I really should use Git submodules. It's not ideal to just copy nothings/stb files.
And last reason is that I just want to do it from scratch. That's it.
Rest of file remains the same. I know it's outdated by now, but I'll just leave it as it is.
Maybe because I can? Why you ever asking that question? Also I just wanted a reason to learn C and have no other way other than make something like this.
After building everithing as described in section bellow, you should be
left with %d nice binaries in build
folder. Everyone of them accept
simillar arguments with slight changes. Common syntax for them as follows:
build/asciify_NAME -W80 -H24 -T -o output.txt image.png
, where
-W80
is maximum width in characters, optional-H24
is maximum height, optional-T
(or-G
) is color mode (-T
for truetype,-G
for black-and-white, if available, and nothing for default 256-color mode), optional-o filename.txt
is output filename, optional, defaults to STDOUTimage.png
is input image. Supported all image types that are supported by stb_image
There are some converter-specific flags/options, so that'd be good to check
out internal help with -h
flag.
Good question. With help of artsi0m, we now have
more-or-less proper makefile, so you just need to run make
and it should work!
Also because we're using stb
libraries, you don't need to install any
dependencies except make
and gcc
(tcc
won't work for some reason, but if
you're able to fix it, PR's are welcome!)
Of course! If you have any suggestion or improvement, feel free to open new issue, also if you made something already and want to accept those changes by us, you can make pull request too!
Maybe because it was the easiest way to handle popular file types without external dependencies?