2017 © Pedro PelĂĄez
 

library magickly

Magickly is an image processing library for PHP.

image

gravitymedia/magickly

Magickly is an image processing library for PHP.

  • Thursday, September 22, 2016
  • by pCoLaSD
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Magickly

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads Dependency Status, (*1)

Magickly is an image processing library for PHP., (*2)

Requirements

This library has the following requirements:, (*3)

  • PHP 5.6+

Installation

Install Composer in your project:, (*4)

$ curl -s https://getcomposer.org/installer | php

Add the package to your composer.json and install it via Composer:, (*5)

$ php composer.phar require gravitymedia/magickly

Usage

This simple example is showing how to convert an image to RGB color space., (*6)

// Initialize autoloader
require_once __DIR__ . '/vendor/autoload.php';

// Import classes
//use GravityMedia\Magickly\Gmagick\Magickly;
use GravityMedia\Magickly\Imagick\Magickly;
use GravityMedia\Magickly\Image\Palette;

// Create Magickly object
$magickly = new Magickly();

// Open image
$image = $magickly->open('/path/to/image/file.png');

// Create RGB palette
$palette = new Palette\RGB();

// Apply RGB palette to image
$image = $image->withPalette($palette);

// Get image data as stream
$stream = $image->getStream();

// Save image as a copy
file_put_contents('/path/to/image/copy.png', $stream->getContents());

Testing

Clone this repository, install Composer and all dependencies:, (*7)

``` bash $ php composer.phar install, (*8)


Run the test suite: ``` bash $ php composer.phar test

Generating documentation

Clone this repository, install Composer and all dependencies:, (*9)

``` bash $ php composer.phar install, (*10)


Generate the documentation to the `build/docs` directory: ``` bash $ php composer.phar doc

Contributing

Please see CONTRIBUTING for details., (*11)

Credits

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions

22/09 2016