check image mode