Skip to content

Latest commit

 

History

History
79 lines (55 loc) · 1.63 KB

README.md

File metadata and controls

79 lines (55 loc) · 1.63 KB

Mozify

Build Status Latest Stable Version GitHub license

Email client blocks images by default. Mozify is way how to serve images to your customers.

Installation

The preferred way to install this extension is through composer.

Either run

composer require karster/mozify:"*"

or add

"karster/mozify": "*"

to the require section of your composer.json.

Usage

use karster\image\Mozify;

$mozify = new Mozify();
$result = $mozify->setImageSrc('path/to/image.jpg')
        ->setSearchWindow(10)
        ->setColorDepth(8)
        ->setTest(true)
        ->generate();

echo $result;

To change image dimensions set width or height. Second attribute will calculate from image ratio.

use karster\image\Mozify;

$mozify = new Mozify();
$result = $mozify->setImageSrc('path/to/image.jpg')
        ->setSearchWindow(10)
        ->setColorDepth(8)
        ->setWidth(500)
        //->setHeight(300)
        ->generate();

echo $result;

Safari

Coffee

Tests

./vendor/bin/phpunit -c phpunit.xml

Contribution

Have an idea? Found a bug? See how to contribute.

License

MIT see LICENSE for the full license text.