You are not logged in.
Pages: 1
A general question to a detail I'm missing in all the descriptions of dithering algorithms:
Shall the error values be able to accumulate to values even less than 0 or greater than 255?
If yes, then the error buffer can't be an image itself which is limited to 1-byte values per component... that is probably my mistake and explains the different appearance with stripes.
Yes, the error 500 is related to limitations of the server I'm using, and some strange behaviour of PHP -- taking incredible amounts of RAM, more than really necessary, way beyond 3x the size of the true-color image it shall process. I have no idea if I made a mistake in my PHP algorithm, if I could avoid it by including specific "tidy up!" commands...
License? Uhm ... it is a study, a "proof of concept", not an application for daily use. As the patent for Shiau-Fan is expected to run out quite soon, I wonder if I may even make the source public, but as mentioned, something is weird regarding memory consumption. Well ... after Ostromoukhov was implemented, maybe. Or it may disappear. Who knows.
__
P.S.: I tried to discuss it in DoomWorld's image thread, after offering a few "sky cylinders" created from higher resolution panorama images using some "noise dither" to apply the DOOM PLAYPAL; but no replies so far.
Sorry for the delay - looks like I waited for a never sent reply notification... (and I can't upload an avatar either; maybe due to the post count?)
I included some variants from the documentation of libcaca; and also I successfully adapted some matrices on my own with interesting results (playing in another script - subject to changing unexpectedly).
Quite an interesting article, xot & all. Thank you for collecting so many matrices to compare.
I did not yet use GML, but was able to implement matrix based Image dithering with palette matching in PHP using GD2 functions, specifically to match true-color textures to e.g. the DOOM PLAYPAL (via imagecolorat, imagecolorclosest, imagecolorsforindex etc.), with reducable error distribution factor to avoid high-contrast stray pixels.
I believe that a YUV or HSL/HSV (instead of euklidean RGB space distance) based calculation of the closest available palette index color might improve the results further.
Pages: 1