Add support for odd-sized images