This is a new image storing format, which decreases the number of colors in the image to achieve an extremely low file size. With different quality settings, it gets 3-5 times smaller image files than jpg images. It was written entirely in C++, which gives reasonable processing speeds. This repository contains source for FSD file reading program and a program to convert regular images to FSD format along with an installer for them.
This program uses Floyd–Steinberg's dithering algorithm to distribute colors on the picture without losing its details. The colors themselves are chosen with the k-means clustering method, which searches for big clusters of similar colors in color space and chooses their centers as new image colors.
Image is saved to disk with almost the most basic and simple algorithm possible — Run-Length encoding (surely must be changed in future). To make the resulting file smaller, it is then compressed with the zpaq file compression library.
JPEG / PNG | FSD |
---|---|
Regular JPEG image with default quality setting of 90, wheighting 216 KB. In PNG format, it weights 1013 KB. |
FSD image compressed to 8 colors, weights only 75 KB. |
I havent tried compiling this project with anything other than Visual Studio, and for it, the compilation is simple. Everything needed for the project is already in the repository, so all you need is to include SDL folders in linker settings, if they are not set up already, and then compile the binaries.