8,10c8 < $itypesare=['png','HEIC']; < for ($iii=0; $iii $it = new GlobIterator(__DIR__ . "/*.png"); 20,22d17 < if (strpos($file, '.HEIC') !== false) { < $pdfcommand=' ; /usr/local/bin/convert -quality 100 "' . $pdfprefix . '*.{jpeG}" ' . $pdfprefix . '.Pdf'; < } else { 24d18 < } 30,32d23 < if (strpos($file, '.HEIC') !== false) { < $pdfcommand=' ; /usr/local/bin/convert -quality 100 "' . $pdfprefix . '*.{jpeG}" ' . $pdfprefix . '.Pdf'; < } else { 34d24 < } 43,47c33 < if (strpos($file, '.HEIC') !== false) { < $gifcommand=' ; /usr/local/bin/convert -delay 20 "' . $gifprefix . '*.{jpeG}" -loop 0 ' . $gifprefix . '.Gif'; < } else { < $gifcommand=' ; /usr/local/bin/convert -delay 20 "' . $gifprefix . '*.{jpeg}" -loop 0 ' . $gifprefix . '.Gif'; < } --- > $gifcommand=' ; /usr/local/bin/convert -delay 400 "' . $gifprefix . '*.{jpeg}" -loop 0 ' . $gifprefix . '.Gif'; 53,57c39 < if (strpos($file, '.HEIC') !== false) { < $gifcommand=' ; /usr/local/bin/convert -delay 20 "' . $gifprefix . '*.{jpeG}" -loop 0 ' . $gifprefix . '.Gif'; < } else { < $gifcommand=' ; /usr/local/bin/convert -delay 20 "' . $gifprefix . '*.{jpeg}" -loop 0 ' . $gifprefix . '.Gif'; < } --- > $gifcommand=' ; /usr/local/bin/convert -delay 400 "' . $gifprefix . '*.{jpeg}" -loop 0 ' . $gifprefix . '.Gif'; 60,64c42 < if ((!file_exists(str_replace('.png','.jpg',$file)) && !file_exists(str_replace('.png','.jpeg',$file)) && strpos($file, '.HEIC') === false) || (!file_exists(str_replace('.HEIC','.jpG',$file)) && !file_exists(str_replace('.HEIC','.jpeG',$file)) && strpos($file, '.HEIC') !== false)) { < if (strpos($file, '.HEIC') !== false) { < exec("cd " . __DIR__ . '; /usr/local/bin/convert -quality 30 ' . $file . ' ' . str_replace('.HEIC','.jpeG',$file) . $pdfcommand . $gifcommand); < } else { < file_put_contents("xr.xr","cd " . __DIR__ . '; /usr/local/bin/convert -quality 30 ' . $file . ' ' . str_replace('.png','.jpeg',$file) . $pdfcommand . $gifcommand); --- > if (!file_exists(str_replace('.png','.jpg',$file)) && !file_exists(str_replace('.png','.jpeg',$file))) { 66,71c44 < } < } else if ((!file_exists(str_replace('.png','.jpg',$file)) && file_exists(str_replace('.png','.jpeg',$file)) && strpos($file, '.HEIC') === false) || (!file_exists(str_replace('.HEIC','.jpG',$file)) && file_exists(str_replace('.HEIC','.jpeG',$file)) && strpos($file, '.HEIC') !== false)) { < if (strpos($file, '.HEIC') !== false) { < exec("cd " . __DIR__ . '; /usr/local/bin/convert -quality 30 ' . $file . ' ' . str_replace('.HEIC','.jpG',$file) . $pdfcommand . $gifcommand); < } else { < file_put_contents("xr.xr","cd " . __DIR__ . '; /usr/local/bin/convert -quality 30 ' . $file . ' ' . str_replace('.png','.jpg',$file) . $pdfcommand . $gifcommand); --- > } else if (!file_exists(str_replace('.png','.jpg',$file)) && file_exists(str_replace('.png','.jpeg',$file))) { 73d45 < } 76d47 < }