fixed a bug where the width and height in the output array were swapped. added flag to save the temp resize file