lagrange
lagrange copied to clipboard
Farbfeld image support
Farbfeld is a lossless image format which is easy to parse. No extra dependencies. It would be really nice to have its native support in Lagrange. Example: https://github.com/lstanesa/SDL_Farbfeld.
It would be really nice to have its native support
I must ask: why would this be nice? What kind of use case are you thinking of?
This is basically just a raw RGBA16 pixel array. That seems excessive for Gemini? I would probably often need to convert it down to RGBA8 to be able to display it.
I must ask: why would this be nice? What kind of use case are you thinking of?
Gemini is really in line with suckless philosofy, so it is not surprising that some/many gemini users interested in suckless ideas and software as well. Many image processing tools have farbfeld support, so it's not a problem to create some picture for gemlog post for example. Using simple image format for content delivered via simpe protocol, looks really natural. Considering that there is no extra dependencies. After all, we use gemini as alternative to http, so using farbfeld as alternative to jpeg is not something strange:)
Correct me if I'm wrong, but the point of Farbfeld seems to be to make it simple and easy to load and process images with full precision. It is in no way optimal for use as a transport format, though. Reading the FAQ I got the impression that Farbfeld images would be compressed using some file compression tool before transferring them to another computer. Therefore, serving "raw" Farbfeld over Gemini seems ill-advised.
Colorspaces are also important when dealing with images, and Farbfeld seems to have no support for them.
This is a pretty straightforward format to add support for, but I'm having difficulties seeing the practical value. So, patches are welcome as I'm not rushing to implement this myself...
Farbfeld is nice because of the "MIME hooks" feature; it can be used to convert other formats into farbfeld. It is not very useful without that feature. I agree that farbfeld files should not be used as a transport format, and also should not be used as a storage format on disk, even if it is compressed (although the inventor seems to believe it is suitable for these purposes, as well as pipes; I use farbfeld only with pipes). However, it is useful in combination with the MIME hooks feature, which can be used to convert other formats into farbfeld for the purpose of display; since it uses pipes, it (presumably) does not store the picture on disk.