masterexploder / PHPThumb

PHP Thumbnail & Image Manipulation Library
http://phpthumb.gxdlabs.com
980 stars 264 forks source link

+imageFilter: simple wrapper for GD function #39

Closed inalyricalcoma closed 12 years ago

inalyricalcoma commented 13 years ago

simple wrapper for GD function, so we can use filters via http://php.net/manual/en/function.imagefilter.php

thanks for you work!

gtraxx commented 12 years ago

How do I use filtered to have a black and white for example? Can we make a simple plugin to transform a black and white using filter? Best regards

inalyricalcoma commented 12 years ago

if you need a grayscale image as output, you can do:

$thumb->imageFilter(IMG_FILTER_GRAYSCALE);

where $thumb is your PhpThumb object :)

ofc, your server needs to be able to use imageFilters, there's a note in php docs: This function is only available if PHP is compiled with the bundled version of the GD library.

which, incidentally, i discovered by myself today D:

gtraxx commented 12 years ago

thank you, I commented on my ticket about creating a plugin. It is finished and being tested :) see my ticket : https://github.com/masterexploder/PHPThumb/issues/51

stephencozart commented 12 years ago

Nice work!! I had actually just created a plugin to do just this but It's nice to have it in the source code. Should of checked here first :)

gtraxx commented 12 years ago

Hello I also created a plugin to do tha t and more, which turns black and white, sepia, customization How to mail it in via my github account? I discover github :)