Gifshuffle emdedding is broken
Gifshuffle embedding doesn't work on most gif files. It works indeed with sunflower.gif However I added 2 new gif files with which the embedding fails. With sunflower2.gif I get a SteganoKeyException during extraction. The payload extractor reads garbage there. With sunflower3.gif I get an ArrayIndexOutofBoundsException during embedding.
It seems to me that these 2 issues are not directly related to each other. I added a (currently failing) test for gifshuffle embedding.
The issue with sunflower2.gif seems to be related to
ColorDistance.RGB_EUCLID. When I use
ColorDistance.CIEDE_2000, I do not get the error.
So when I sort the color table using
ColorDistance.RGB_EUCLID, the resulting order is not always the same, but seems to be depended on the initial sorting?
One solution could be to preorder the color table from low RGB-values to high values. Or simply use