Protection Violation when using jpeg.dll - memory overloaded