Properly set the image depth