refactoring to the png optimization and compression middleware. now tested and works on windows.