change in the jpegcode example

The jpegcode example was modified and repair all the bugs.