Make jpeg image format valid for texturex patches