qualify resize algorithm