Automatic batch generation thumbnail

xiaoxiao2021-03-06  89

It is a thumbnail

Put the file

If there is a picture in the directory, you will automatically generate a small picture.

Suitable for batch generation small maps, doing pictures of the picture station.

$ file ". Endl; $ = @ImageCreateFromJPEG ($ file); if (! $ =) {$ op. =" fail -> COULDN'T Create Sour Image Pointer. " $ File_Exists ($ config ['prefix']. $ File || Substr ($ file, 0, strlen ($ config ['prefix']) == $ config ['prefix'] ) {$ Op. = "Note -> this file haas already GOT A thumbnail. "Endl; Continue;} $ to = imagecreatetruecolor ($ config ['t_width'], $ config ['t_height']); if (! $ to) {$ OP. =" fail -> COULDN ' Create Dest Image Pointer. "Endl; Continue;} IF (! ImageCopyResample) ($ To, $ IM, 0, 0, 0, 0, $ Config ['T_Width'], $ Config ['

转载请注明原文地址:https://www.9cbs.com/read-95422.html

New Post(0)