Memory jpeg output fix
Merge pull request #2 from pkrnjevic/dev

Memory jpeg output fix