fix: resize 1×X & X×1 sized images throws exceptions