Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ajenbo/image.php

Helper function for simple image manipulation using GD functions
https://github.com/ajenbo/image.php

Last synced: 20 days ago
JSON representation

Helper function for simple image manipulation using GD functions

Awesome Lists containing this project

README

        

Image.php
================

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e795c8fb840040118bdba4f2a0ac64a1)](https://www.codacy.com/app/AJenbo/Image-php?utm_source=github.com&utm_medium=referral&utm_content=AJenbo/Image.php&utm_campaign=Badge_Grade)

Helper function for simple image manipulation using GD functions.

###Samples
Open an image, remove any boarder, resize to 64x64 and save it.



$path = 'test.png';
$image = new Image($path);
$imageContent = $image->findContent();
$image->crop(
$imageContent['x'],
$imageContent['y'],
$imageContent['width'],
$imageContent['height']
);
$image->resize(64, 64);
$image->save($path, 'png');