Image shape margin tests