|
121 | 121 | } |
122 | 122 | //webpサムネイル |
123 | 123 | if(!is_file("petit/webp/{$time}t.webp")){ |
124 | | - thumb("petit/src/",$imgfile,$time,300,800,['webp'=>true]); |
| 124 | + thumbnail_gd::thumb("petit/src/",$imgfile,$time,300,800,['webp'=>true]); |
125 | 125 | } |
126 | 126 | //webp s サムネイル |
127 | | - if(thumb('petit/src/',$imgfile,$time,$w,$h,['thumbnail_webp'=>true])){ |
| 127 | + if(thumbnail_gd::thumb('petit/src/',$imgfile,$time,$w,$h,['thumbnail_webp'=>true])){ |
128 | 128 | $thumbnail='thumbnail_webp'; |
129 | 129 | } |
130 | 130 | if(!$thumbnail && is_file(THUMB_DIR."{$_time}s.jpg")){//画像 |
@@ -369,7 +369,7 @@ function switch_tool($tool){ |
369 | 369 | class thumbnail_gd { |
370 | 370 |
|
371 | 371 | public static function thumb($path,$fname,$time,$max_w,$max_h,$options=[]): ?string { |
372 | | - $path=basename($path).'/'; |
| 372 | + // $path=basename($path).'/'; |
373 | 373 | $fname=basename($fname); |
374 | 374 | $time=basename($time); |
375 | 375 | if(!ctype_digit($time)) { |
@@ -587,17 +587,17 @@ private static function createThumbnailImage($im_out, $time, $options): ?string |
587 | 587 |
|
588 | 588 | } elseif(isset($options['webp'])){ |
589 | 589 |
|
590 | | - $outfile='poti/webp/'.$time.'t.webp'; |
| 590 | + $outfile='petit/webp/'.$time.'t.webp'; |
591 | 591 | ImageWEBP($im_out, $outfile,90); |
592 | 592 |
|
593 | 593 | }elseif(isset($options['thumbnail_webp'])){ |
594 | 594 |
|
595 | | - $outfile=THUMB_DIR.$time.'s.webp'; |
| 595 | + $outfile="petit/thumbnail/{$time}s.webp"; |
596 | 596 | ImageWEBP($im_out, $outfile,90); |
597 | 597 |
|
598 | 598 | }else{ |
599 | 599 |
|
600 | | - $outfile=THUMB_DIR.$time.'s.jpg'; |
| 600 | + $outfile="petit/thumbnail/{$time}s.jpg"; |
601 | 601 | // サムネイル画像を保存 |
602 | 602 | ImageJPEG($im_out, $outfile,90); |
603 | 603 |
|
|
0 commit comments