added image content modes
implemented image content mode handling
updated tests