This commit is contained in:
2026-01-30 11:10:47 +01:00
parent c00299abb9
commit 33111583a3
11 changed files with 2479 additions and 0 deletions

39
imgscale.php Executable file
View File

@@ -0,0 +1,39 @@
<?php
$b = isset($_GET['b']) ? $_GET['b'] : '160';
$q = isset($_GET['q']) ? $_GET['q'] : '75';
$bild = $_GET['bild'];
header('Content-Type: image/jpeg');
#$bild_src = imagecreatefromjpeg($bild);
#$bild_neu = imagescale ( $bild_src , $b ,-1 ,IMG_BICUBIC_FIXED);
#imagejpeg( $bild_neu, NULL, $q );
#imagedestroy($tmpbild);
#header('Content-Type: image/jpeg');
#echo "test";
$bild_src = imagecreatefromjpeg($bild);
$height = imagesy($bild_src);
$width = imagesx($bild_src);
$h = round($b/$width*$height);
$bild_neu = imagecreatetruecolor($b, $h);
imagecopyresampled($bild_neu, $bild_src, 0, 0, 0, 0, $b, $h, $width, $height);
imagejpeg( $bild_neu, NULL, $q );
imagedestroy($bild_src);
imagedestroy($bild_neu);
?>