This shouldn't be too hard for you to write yourself. Read through the tables and for each image:
fopen a new file (with the image name as the name) in your image folder,
write the blob variable into the file
close the file
Just be sure the file you open is of the correct extension, i.e .gif or .jpg.