mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-16 13:04:13 +02:00
resize-strategies together with no upscale
This commit is contained in:
@@ -22,7 +22,8 @@ $images = array(
|
||||
|
||||
|
||||
// For each image, apply these testcases
|
||||
$nc = null; //"&nc"; //null; //&nc';
|
||||
$nc = empty($_SERVER['QUERY_STRING']) ? "" : "&" . $_SERVER['QUERY_STRING'];
|
||||
|
||||
$testcase = array(
|
||||
$nc . '&w=600',
|
||||
$nc . '&w=600&no-upscale',
|
||||
@@ -42,8 +43,8 @@ $testcase = array(
|
||||
$nc . '&w=600&h=200&no-upscale&crop-to-fit',
|
||||
$nc . '&w=300&h=400&crop-to-fit',
|
||||
$nc . '&w=300&h=400&no-upscale&crop-to-fit',
|
||||
$nc . '&w=600&h=400&fill-to-fit',
|
||||
$nc . '&w=600&h=400&no-upscale&fill-to-fit',
|
||||
$nc . '&w=600&h=500&fill-to-fit',
|
||||
$nc . '&w=600&h=500&no-upscale&fill-to-fit',
|
||||
/*
|
||||
$nc . '&w=600&ar=1.6',
|
||||
$nc . '&w=600&ar=1.6&no-upscale',
|
43
webroot/test/resize-landscape.php
Normal file
43
webroot/test/resize-landscape.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// Include config for all testcases
|
||||
include __DIR__ . "/config.php";
|
||||
|
||||
|
||||
|
||||
// The title of the test case
|
||||
$title = "Testing resize landscape image";
|
||||
|
||||
|
||||
|
||||
// Provide a short description of the testcase.
|
||||
$description = "Resize landscape image";
|
||||
|
||||
|
||||
|
||||
// Use these images in the test
|
||||
$images = array(
|
||||
'car.png',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// For each image, apply these testcases
|
||||
$nc = empty($_SERVER['QUERY_STRING']) ? "" : "&" . $_SERVER['QUERY_STRING'];
|
||||
|
||||
$testcase = array(
|
||||
$nc . '&w=500',
|
||||
$nc . '&h=200',
|
||||
$nc . '&w=500&h=500',
|
||||
$nc . '&w=500&h=200',
|
||||
$nc . '&w=500&h=200&crop-to-fit',
|
||||
$nc . '&w=200&h=500&crop-to-fit',
|
||||
$nc . '&w=500&h=200&fill-to-fit',
|
||||
$nc . '&w=200&h=500&fill-to-fit',
|
||||
$nc . '&w=500&h=200&stretch',
|
||||
$nc . '&w=200&h=500&stretch',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Apply testcases and present results
|
||||
include __DIR__ . "/template.php";
|
43
webroot/test/resize-portrait.php
Normal file
43
webroot/test/resize-portrait.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// Include config for all testcases
|
||||
include __DIR__ . "/config.php";
|
||||
|
||||
|
||||
|
||||
// The title of the test case
|
||||
$title = "Testing resize portrait image";
|
||||
|
||||
|
||||
|
||||
// Provide a short description of the testcase.
|
||||
$description = "Resize portrait image";
|
||||
|
||||
|
||||
|
||||
// Use these images in the test
|
||||
$images = array(
|
||||
'kodim04.png',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// For each image, apply these testcases
|
||||
$nc = empty($_SERVER['QUERY_STRING']) ? "" : "&" . $_SERVER['QUERY_STRING'];
|
||||
|
||||
$testcase = array(
|
||||
$nc . '&w=500',
|
||||
$nc . '&h=200',
|
||||
$nc . '&w=500&h=500',
|
||||
$nc . '&w=500&h=200',
|
||||
$nc . '&w=500&h=200&crop-to-fit',
|
||||
$nc . '&w=200&h=500&crop-to-fit',
|
||||
$nc . '&w=500&h=200&fill-to-fit',
|
||||
$nc . '&w=200&h=500&fill-to-fit',
|
||||
$nc . '&w=500&h=200&stretch',
|
||||
$nc . '&w=200&h=500&stretch',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Apply testcases and present results
|
||||
include __DIR__ . "/template.php";
|
Reference in New Issue
Block a user