3 ms·
If starting from scratch, PNG files may actually be more complex, since decoding is needed. On the other hand, once a drawing API is available, it is easier to
by signaru 3y ago
If starting from scratch, PNG files may actually be more complex, since decoding is needed. On the other hand, once a drawing API is available, it is easier to map some form of vector graphics encoding which calls corresponding drawing instructions. At the same time, this would also solve scaling issues and the vector graphics assets also normally takes far less space.
- TkTech 3y agoPNG files are much, much more complex. Although you can slim it down quite a bit, libpng16.so.16.40.0 alone is 229.9KiB. The entire Kernel.esx of Essence is just 843.1KiB.
- smokel 3y agoPNG decoding is little more than an implementation of DEFLATE and handling of the delta encoding. For your own OS you most likely do not have to be feature complete. As an example, picoPNG [1] decodes most .png images, and is only ~500 lines of beautiful C++ code. For most practical purposes, you can probably get away with much less. [1] https://lodev.org/lodepng/ https://lodev.org/lodepng/