Hi there,
I used djepeg/cjpeg. It works perfectly, I understand is not quite easy to operate but results are good.
The next section is a routine to generate thumbnail files (thumb_FILENAME.jpg) given a certain Jpeg (FILENAME.JPG):
$full_thumbnail= "/your_full_path_to_store_thumbnails/"."thumb_".$FILENAME;
$full_userfile_name="/your_full_path_where_FILENAMES_are_stored/" .$FILENAME;
passthru ( "djpeg -scale 1/8 < $full_userfile_name | cjpeg > $full_thumbnail" );
I hope this helps.
Vin