The JPEG image compression using MATLAB source code after testing you can use the full source code, has been tested and can be used directly.
File list:
JPEG@matlab
..........\0.tif
..........\1.tif
..........\2.tif
..........\3.tif
..........\4.tif
..........\5.tif
..........\6.tif
..........\7.tif
..........\8.tif
..........\9.TIF
..........\jpeg.m
..........\readme.txt
..........\Thumbs.db