get_mask_bounds now works on images