Make ImageFormat comparable, hashable