Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renepardon/phluzia
Image Magick Wrapper Library
https://github.com/renepardon/phluzia
Last synced: 12 days ago
JSON representation
Image Magick Wrapper Library
- Host: GitHub
- URL: https://github.com/renepardon/phluzia
- Owner: renepardon
- License: lgpl-3.0
- Created: 2014-01-08T14:23:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-15T07:19:52.000Z (almost 11 years ago)
- Last Synced: 2023-03-15T11:45:26.404Z (over 1 year ago)
- Language: PHP
- Size: 2.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PhLuzia
========Image Magick Wrapper Library.
Support for Graphics Magick is comming soon. You can configure which library to use through config/module.config.phpBuild status
------------
Master branch:[![Build Status](https://secure.travis-ci.org/renepardon/PhLuzia.png?branch=master)](http://travis-ci.org/renepardon/PhLuzia)
Installation
------------Ready to use within a ZF2 project. Just clone into **vendor/** directory and link within application config as module.
### Composer
Add the following parts to your **composer.json** file...
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/renepardon/PhLuzia.git"
}
],
"require": {
"renepardon/PhLuzia": "dev-master"
}
}
```... and execute:
$ php composer.phar update
### Git clone
$ cd /path/to/project
$ mkdir vendor/renepardon
$ git clone --recursive https://github.com/renepardon/PhLuzia.git vendor/renepardon/PhLuzia#### config/application.config.php
```php
array(
'PhLuzia',
),
);
```Configuration
-------------There is a configuration array placed within **module.config.php**. You can edit this configuration or place your own one into the Application's configuration folder.
Modify the default values and switch between Graphicsmagick/Imagemagick.Usage
-----```php
serviceManager->get('phluzia');
// Source is the image we want to modify and destination the name of new image.
$service->setSource('/tmp/testimage.jpg')
->setDestination('/tmp/testimage_1_' . time() . '.jpg');
// The first call to resize will return an instance of Adapter and the second one call's the resize method.
$service->resize()->resize(150, 200, true);// Use the same service but set source again, so that we work on a new image.
$service->setSource('/tmp/testimage.jpg')
->setDestination('/tmp/testimage_2_' . time() . '.jpg');
$watermarkImage = realpath(dirname(__FILE__) . '/_files/watermark.png');
// This places the watermark image on the top left without transparency.
$this->service->compose()->watermark($watermarkImage, Gravity::NorthWest, 100);
```