use sse for resizing before jpeg encoding
remove unused function
remove obsolete code