path generation for resizing