1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-11 02:24:15 +02:00

passed test for resize strategies including no upscale using test/option-no-upscale

This commit is contained in:
Mikael Roos
2016-06-01 13:57:48 +02:00
parent 00ab2d7ca6
commit 74428f066c
6 changed files with 67 additions and 35 deletions

BIN
webroot/img/tower.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@@ -18,43 +18,38 @@ $description = "Do not upscale image when original image (slice) is smaller than
$images = array(
'car.png',
'apple.jpg',
'tower.jpg',
);
// For each image, apply these testcases
$nc = "&bgc=660000"; //null; //"&nc"; //null; //&nc';
$nc = "&bgc=660000&nc"; //null; //"&nc"; //null; //&nc';
$testcase = array(
$nc . '&w=600',
$nc . '&w=600&no-upscale',
$nc . '&h=400',
$nc . '&h=400&no-upscale',
$nc . '&w=600&h=400',
$nc . '&w=600&h=400&no-upscale',
$nc . '&w=700&h=400&stretch',
$nc . '&w=700&h=400&no-upscale&stretch',
$nc . '&h=420',
$nc . '&h=420&no-upscale',
$nc . '&w=600&h=420',
$nc . '&w=600&h=420&no-upscale',
$nc . '&w=700&h=420&stretch',
$nc . '&w=700&h=420&no-upscale&stretch',
$nc . '&w=700&h=200&stretch',
$nc . '&w=700&h=200&no-upscale&stretch',
$nc . '&w=250&h=400&stretch',
$nc . '&w=250&h=400&no-upscale&stretch',
$nc . '&w=700&h=400&crop-to-fit',
$nc . '&w=700&h=400&no-upscale&crop-to-fit',
$nc . '&w=250&h=420&stretch',
$nc . '&w=250&h=420&no-upscale&stretch',
$nc . '&w=700&h=420&crop-to-fit',
$nc . '&w=700&h=420&no-upscale&crop-to-fit',
$nc . '&w=700&h=200&crop-to-fit',
$nc . '&w=700&h=200&no-upscale&crop-to-fit',
$nc . '&w=250&h=400&crop-to-fit',
$nc . '&w=250&h=400&no-upscale&crop-to-fit',
$nc . '&w=250&h=420&crop-to-fit',
$nc . '&w=250&h=420&no-upscale&crop-to-fit',
$nc . '&w=600&h=500&fill-to-fit',
$nc . '&w=600&h=500&no-upscale&fill-to-fit',
$nc . '&w=250&h=400&fill-to-fit',
$nc . '&w=250&h=400&no-upscale&fill-to-fit',
$nc . '&w=700&h=400&fill-to-fit',
$nc . '&w=700&h=400&no-upscale&fill-to-fit',
/*
$nc . '&w=600&ar=1.6',
$nc . '&w=600&ar=1.6&no-upscale',
$nc . '&h=400&ar=1.6',
$nc . '&h=400&ar=1.6&no-upscale',
*/
$nc . '&w=250&h=420&fill-to-fit',
$nc . '&w=250&h=420&no-upscale&fill-to-fit',
$nc . '&w=700&h=420&fill-to-fit',
$nc . '&w=700&h=420&no-upscale&fill-to-fit',
);