close streams after resizing pictures