Unification of some formats and image data compression

This is a tiny little optimization.