mnist: added template test for encoding image data