I have decided on the attached images (ignore the last two "frames"), and as can be seen I have 2 pairs of images that are simply reflections of each other.
There's some simple optimization that can save you some storage bytes.
They only work because of the properties of the images you selected.
The first is very simple, and will just save you 6 bytes of storage, at no additional code cost:
if the images are stored as a contiguous array, using offset constants to address the start of each one, you can overlap the common bytes of each one with the one following.
So, the 1st will overlap the 2nd by one byte, and so on until the 6th overlapping the 7th.
Nothing to do for the 7th and the 8th
.
Edit: Added an image (worth
a thousand words six bytes). In red the start and in blue the end of each pattern.
The other optimization can save you 12 bytes of storage, but at the cost of some more code, so you have to evaluate if that's worth the effort:
all the images with the exception of the 2nd and 3rd ones have horizontal symmetry.
If the 5 bytes are read in loop, then you could count up from 0 to 2 and then back to 0 and pare the the 2nd half (last two bytes, actually) of each symmetrical image.
But the code to differentiate the symmetric images from the non symmetric ones might end up costing more, even if you encode the information in the spare bit.