Home >> News >> 500 byte images: the Haiku Vector Icon Format

500 byte images: the Haiku Vector Icon Format

Haiku uses a custom vector image format to store icons. This is surprising both because most OSes consider bitmaps to be totally sufficient to represent icons and because there are plenty of vector graphics formats out this (e.g. SVG). The goal of the Haiku Vector Icon Format (HVIF) is to make vector icon files as small as possible. This allows Haiku to display icons as several sizes while still keeping the files small enough to fit into an inode (i.e., inside a fileâ??s metadata). The goal of keeping the icons in the metadata is to reduce the disk reads needed to display a folder – it also each file to only require one disk read to display.

This blog post examines the details of the HVIF format using a hex editor and the canonical parser’s source code. In the process of dissecting an example icon, I’ll also show you an optimization bug in the icon image editor.

Great article.

Leave a Reply

Your email address will not be published. Required fields are marked *