Udpated : Thumb Generation

This commit is contained in:
Arslan Hassan 2012-09-02 16:35:24 +00:00
parent 6a1ca78f45
commit d2587efbeb
3 changed files with 13 additions and 5 deletions

View file

@ -80,17 +80,22 @@ if ($process_running <= $max_processes && $queued_files) {
*/
if (!hasThumbs($queue)) {
$cbupload->update_queue_status($queue, 'u', 'Generating thumbs...', false);
//Generate thumbnails first...then move on..
$thumb_sizes = get_thumb_sizes();
$thumbs_dir = THUMBS_DIR.'/'.$folder;
if ($thumb_sizes) {
foreach ($thumb_sizes as $thumb_size) {
$size = $thumb_size['size'];
$suffix = $thumb_size['sufix'];
$suffix = $thumb_size['suffix'];
$outname = $queue['queue_name'].'-'.$suffix;
$cbupload->update_queue_status($queue, 'u', 'Extacting '.$outname, false);
//Using Multi Thumb Gen function..
//$converter = new CBConverter($original_source);
$converter->extractThumb(NULL, array(
@ -101,6 +106,8 @@ if ($process_running <= $max_processes && $queued_files) {
'outdir' => $thumbs_dir,
'resize' => 'fit'
));
}
}
}

View file

@ -238,6 +238,7 @@ class CBConverter
}
$result = shell_exec( $cmd.$output_cmd);
if(!$result && $output)
{
//Read output file..
@ -1627,7 +1628,7 @@ class CBConverter
$CMD .= "' ";
}
//echo $CMD .= " ".$outputname;
echo $CMD .= " ".$outputname;
$this->exec($CMD);
return $CMD;

View file

@ -15,5 +15,5 @@ add_thumb_size('120x60');
add_thumb_size('160x120');
add_thumb_size('300x250');
add_thumb_size('640x360');
add_thumb_size('same', 'original');
?>