mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-30 10:59:51 +02:00
Correcting internal details for save-as and response json which indicated wrong colors. Fix #62.
This commit is contained in:
BIN
webroot/img/car.gif
Normal file
BIN
webroot/img/car.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
@@ -11,7 +11,7 @@
|
||||
window.getDetails = function (url, id) {
|
||||
$.getJSON(url, function(data) {
|
||||
element = document.getElementById(id);
|
||||
element.innerHTML = "filename: " + data.filename + "\nsize: " + data.size + "\nwidth: " + data.width + "\nheigh: " + data.height + "\naspect-ratio: " + data.aspectRatio;
|
||||
element.innerHTML = "filename: " + data.filename + "\ncolors: " + data.colors + "\nsize: " + data.size + "\nwidth: " + data.width + "\nheigh: " + data.height + "\naspect-ratio: " + data.aspectRatio;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
38
webroot/test/test_option-save-as.php
Normal file
38
webroot/test/test_option-save-as.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// Include config for all testcases
|
||||
include __DIR__ . "/config.php";
|
||||
|
||||
|
||||
|
||||
// The title of the test case
|
||||
$title = "Testing option save-as - save image to another format";
|
||||
|
||||
|
||||
|
||||
// Provide a short description of the testcase.
|
||||
$description = "";
|
||||
|
||||
|
||||
|
||||
// Use these images in the test
|
||||
$images = array(
|
||||
'car.png',
|
||||
'ball24.png',
|
||||
'wider.jpg',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// For each image, apply these testcases
|
||||
$nc = "&nc"; //null; //&nc';
|
||||
$testcase = array(
|
||||
$nc . '&w=300&sa=jpg',
|
||||
$nc . '&w=300&sa=png',
|
||||
$nc . '&w=300&sa=gif',
|
||||
$nc . '&w=300&sa=png&palette',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Apply testcases and present results
|
||||
include __DIR__ . "/template.php";
|
Reference in New Issue
Block a user