edited from http://prose.io/#j-p-g/cginew/edit/cginew-jpg/README