codevis
codevis copied to clipboard
Variable resolution
It would be nice to create a higher resolution image so that code remains readable.
@FlareFlo I agree, that would be nice. Currently all characters are rendered as 2 pixels high and 1 pixel wide. This was inspired by the scroll bar to the right of vscode.
I am willing to look into rendering the characters as readable text, but am not currently aware of libraries that do it. Please let me know of if you find any.
DO NOTE This would make images much larger. Rendering the Linux kernel, for instance, already generates a PNG file that is around 2GB.
DO NOTE This would make images much larger. Rendering the Linux kernel, for instance, already generates a PNG file that is around 2GB.
Maybe chunking should be used to avoid very large file transactions and to possibly multithread the work in some areas.
Maybe chunking should be used to avoid very large file transactions
Like dividing the output image into multiple smaller output images? It could be done, but you'd need a special image viewer to stitch the images back together.
and to possibly multi-thread the work in some areas.
Luckily we've already made codevis
multi-threaded now.
Apparently text rendering from font files seems like an impossibly complex nightmare. But having codevis make text readable could be done with bitmap fonts like unifont-bitmap. unifont-bitmap
doesn't offer various font sizes, but it does support the Unicode characters required to speak most languages. Making it a better choice than other options that could not display text or code in other languages.
@FlareFlo Images can now be made readable with the --readable
flag in release v0.6.0