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

improving dummy image

This commit is contained in:
Mikael Roos
2015-10-18 17:15:14 +02:00
parent 39b6078d84
commit 1bd6fc8a2c
7 changed files with 70 additions and 11 deletions

View File

@@ -45,14 +45,14 @@ There are several ways of installing. You either install the whole project which
The [sourcode is available on GitHub](https://github.com/mosbth/cimage). Clone, fork or [download as zip](https://github.com/mosbth/cimage/archive/master.zip). The [sourcode is available on GitHub](https://github.com/mosbth/cimage). Clone, fork or [download as zip](https://github.com/mosbth/cimage/archive/master.zip).
**Latest stable version is v0.7.5 released 2015-10-18.** **Latest stable version is v0.7.6 released 2015-10-18.**
I prefer cloning like this. Do switch to the latest stable version. I prefer cloning like this. Do switch to the latest stable version.
```bash ```bash
git clone git://github.com/mosbth/cimage.git git clone git://github.com/mosbth/cimage.git
cd cimage cd cimage
git checkout v0.7.5 git checkout v0.7.6
``` ```
Make the cache-directory writable by the webserver. Make the cache-directory writable by the webserver.
@@ -75,7 +75,7 @@ There are some all-included bundles of `img.php` that can be downloaded and used
Dowload the version of your choice like this. Dowload the version of your choice like this.
```bash ```bash
wget https://github.com/mosbth/cimage/tree/v0.7.5/webroot/imgp.php wget https://github.com/mosbth/cimage/tree/v0.7.6/webroot/imgp.php
``` ```
Open up the file in your editor and edit the array `$config`. Ensure that the paths to the image directory and the cache directory matches your environment, or create an own config-file for the script. Open up the file in your editor and edit the array `$config`. Ensure that the paths to the image directory and the cache directory matches your environment, or create an own config-file for the script.

View File

@@ -5,6 +5,13 @@ Revision history
[![Build Status](https://scrutinizer-ci.com/g/mosbth/cimage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master) [![Build Status](https://scrutinizer-ci.com/g/mosbth/cimage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master)
v0.7.6 (2015-10-18)
-------------------------------------
* Adding testpage for dummy images `webroot/test/test_issue101-dummy.php`.
* Adding width and height when creating dummy image.
v0.7.5 (2015-10-18) v0.7.5 (2015-10-18)
------------------------------------- -------------------------------------

View File

@@ -8,7 +8,7 @@
* *
*/ */
$version = "v0.7.5 (2015-10-18)"; $version = "v0.7.6 (2015-10-18)";
@@ -962,9 +962,13 @@ if ($dummyImage === true) {
->setSource($dummyFilename, $dummyDir) ->setSource($dummyFilename, $dummyDir)
->setOptions( ->setOptions(
array( array(
'bgColor' => $bgColor, 'newWidth' => $newWidth,
'newHeight' => $newHeight,
'bgColor' => $bgColor,
) )
) )
->setJpegQuality($quality)
->setPngCompression($compress)
->createDummyImage() ->createDummyImage()
->generateFilename(null, false) ->generateFilename(null, false)
->save(null, null, false); ->save(null, null, false);

View File

@@ -3481,7 +3481,7 @@ EOD;
* *
*/ */
$version = "v0.7.5 (2015-10-18)"; $version = "v0.7.6 (2015-10-18)";
@@ -4435,9 +4435,13 @@ if ($dummyImage === true) {
->setSource($dummyFilename, $dummyDir) ->setSource($dummyFilename, $dummyDir)
->setOptions( ->setOptions(
array( array(
'bgColor' => $bgColor, 'newWidth' => $newWidth,
'newHeight' => $newHeight,
'bgColor' => $bgColor,
) )
) )
->setJpegQuality($quality)
->setPngCompression($compress)
->createDummyImage() ->createDummyImage()
->generateFilename(null, false) ->generateFilename(null, false)
->save(null, null, false); ->save(null, null, false);

View File

@@ -3481,7 +3481,7 @@ EOD;
* *
*/ */
$version = "v0.7.5 (2015-10-18)"; $version = "v0.7.6 (2015-10-18)";
@@ -4435,9 +4435,13 @@ if ($dummyImage === true) {
->setSource($dummyFilename, $dummyDir) ->setSource($dummyFilename, $dummyDir)
->setOptions( ->setOptions(
array( array(
'bgColor' => $bgColor, 'newWidth' => $newWidth,
'newHeight' => $newHeight,
'bgColor' => $bgColor,
) )
) )
->setJpegQuality($quality)
->setPngCompression($compress)
->createDummyImage() ->createDummyImage()
->generateFilename(null, false) ->generateFilename(null, false)
->save(null, null, false); ->save(null, null, false);

View File

@@ -3481,7 +3481,7 @@ EOD;
* *
*/ */
$version = "v0.7.5 (2015-10-18)"; $version = "v0.7.6 (2015-10-18)";
@@ -4435,9 +4435,13 @@ if ($dummyImage === true) {
->setSource($dummyFilename, $dummyDir) ->setSource($dummyFilename, $dummyDir)
->setOptions( ->setOptions(
array( array(
'bgColor' => $bgColor, 'newWidth' => $newWidth,
'newHeight' => $newHeight,
'bgColor' => $bgColor,
) )
) )
->setJpegQuality($quality)
->setPngCompression($compress)
->createDummyImage() ->createDummyImage()
->generateFilename(null, false) ->generateFilename(null, false)
->save(null, null, false); ->save(null, null, false);

View File

@@ -0,0 +1,36 @@
<?php
// Include config for all testcases
include __DIR__ . "/config.php";
// The title of the test case
$title = "Testing issue 100 - Dummy images";
// Provide a short description of the testcase.
$description = "Create dummy images.";
// Use these images in the test
$images = array(
'dummy',
);
// For each image, apply these testcases
$testcase = array(
'&nc&so',
'&nc&width=300',
'&nc&height=300',
'&nc&width=300&height=300',
'&nc&bgc=006600',
);
// Apply testcases and present results
include __DIR__ . "/template.php";