Fixes problems when image format is !== to internalFormat

We should clearly keep only one field for this.