Word description Runs a unit-test on the image at path to test the image encoder. The image is decoded, encoded, and then decoded again to verify that the final decoded output matches the original decoded output. Before comparison for equality, the images are normalized in order to accommodate differences in representation between the two potential encoders.
Warning This test assumes that the image decoder is working correctly. If the image fails both the decode-test and the encode-test, then you should first debug the decoder. Once the decoder is working correctly, proceed with testing the encoder.