More rubust ImageShape