Assigns classes for determining image heights