コード例 #1
0
 } else {
     $thumbnail_height = $config['thumbnail_size'];
     $thumbnail_width = $config['thumbnail_size'] * ($pic_width / $pic_height);
 }
 $Image = new ImgObj();
 $Image->JPGQuality = $config['thumbnail_quality'];
 $Image->ReadSourceFile($pic_fullpath);
 $Image->Resize($thumbnail_width, $thumbnail_height);
 if ($config['show_pic_size_on_thumb'] == 1) {
     $image_filesize = get_formatted_filesize(filesize($pic_fullpath));
     $image_dimension = intval($pic_width) . "x" . intval($pic_height);
     $image_text_output = $image_dimension . ($thumbnail_width >= 360 ? ' - ' . $image_filesize : '');
     if ($thumbnail_width >= 260) {
         $image_exif_data = $Image->ExifData;
         if (!empty($image_exif_data)) {
             $image_exif_data_short = $Image->exif_get_data_short($image_exif_data);
             $exif_data_key_array = array('MODEL', 'FOCAL_LENGTH', 'EXPOSURE', 'APERTURE', 'ISO');
             $exif_data_array = array();
             foreach ($exif_data_key_array as $exif_key) {
                 if ($image_exif_data_short[$exif_key] != 'EXIF_UNKNOWN') {
                     $process_tag = true;
                     if ($exif_key == 'ISO') {
                         $image_exif_data_short[$exif_key] = 'ISO ' . $image_exif_data_short[$exif_key];
                     } elseif ($exif_key == 'MODEL') {
                         if ($thumbnail_width >= 320) {
                             $image_exif_data_short[$exif_key] = str_replace(array('DIGITAL', '  '), array('', ' '), $image_exif_data_short[$exif_key]);
                             $image_exif_data_short[$exif_key] = strlen($image_exif_data_short[$exif_key]) >= 23 ? substr($image_exif_data_short[$exif_key], 0, 18) . '...' : $image_exif_data_short[$exif_key];
                         } else {
                             $process_tag = false;
                         }
                     }