Grafik erstellen mit neuer Breite und proportionaler Höhe
Veröffentlicht am 28.05.2008 von Alexander E.
PHP - Funktion
1 2 3 4 56 7 8 9 1011 12 13 14 1516 17 | function sy_img_resize($s_image,$f_image,$width,$q="100") { if (!@$image = imagecreatefromjpeg ($s_image)) return 0; $img_w=imagesx($image); $img_h=imagesy($image); $f = $img_w / $width; $height = intval($img_h / $f); $n_image=imagecreatetruecolor($width,$height); imagecopyresampled($n_image,$image,0,0,0,0,$width,$height,$img_w,$img_h); if (@imagejpeg($n_image,$f_image,$q)) return 1; return 0;} |
Suchbegriffe
PHP, Grafik erstellen, imagecreatefromjpeg, imagesx, imagesy
10g 11g API Dateinamen umwandeln GetProcAddress GetTempPath GetTempPathA GetVolumeInformation GetVolumeInformationA GetVolumeInformationW gültige Laufwerke auslesen gültige Laufwerke ermitteln Kernel32.Dll kurzer Dateiname MAX_COMPUTERNAME_LENGTH MAX_PATH Microsoft Scripting Runtime Oracle Scripting.FileSystemObject SetForegroundWindow Shell32.Dll ShellExecuteW Shlwapi.Dll Temp User32.Dll






