zapWidth and zapHeight are now in conf.php (#21)

This commit is contained in:
Fabian de Boer 2026-07-19 22:47:19 +02:00
commit e96b8e5563
4 changed files with 9 additions and 14 deletions

View file

@ -3,9 +3,6 @@
* Image Input Output Tools
*/
class ImgIOTools {
public static $maxScreenWidth = 1067; //screen dimensions
public static $maxScreenHeight = 600;
/**
* Flushes image to screen
@ -13,9 +10,9 @@ class ImgIOTools {
* @return void
*/
public static function onScreen(Imagick $img) {
$img->scaleImage(self::$maxScreenWidth, self::$maxScreenHeight, true);
$img->scaleImage(ZAP_DEFAULT_WIDTH, ZAP_DEFAULT_HEIGHT, true);
//$img = self::scaleByLength($img, $this->maxScreenWidth, $this->maxScreenHeight);
//$img = self::scaleByLength($img, ZAP_DEFAULT_WIDTH, ZAP_DEFAULT_HEIGHT);
header('Content-type: image/' . ZAP_IMG_TYPE);
echo $img->getImageBlob();
}
@ -46,5 +43,4 @@ class ImgIOTools {
$path = $folder . $filename . '.' . ZAP_IMG_TYPE;
return $img->writeImage($path);
}
}
?>
}