I have this PHP code which I am unsure if it does the right vignette fine.
Code: Select all
function vignette($input, $color_1 = 'none', $color_2 = 'black', $crop_factor = 1.5)
{
$img_resource_size=getimagesize($input);
$img_resource_width=$img_resource_size[0];
$img_resource_height=$img_resource_size[1];
$crop_x = floor($img_resource_width * $crop_factor);
$crop_y = floor($img_resource_height * $crop_factor);
$command=("convert
( {$input} )
( -size {$crop_x}x{$crop_y}
radial-gradient:$color_1-$color_2
-gravity center -crop {$this->_width}x{$this->_height}+0+0 +repage )
-compose multiply -flatten
{$input}");
$command = str_replace(array("\n", "'"), array('', '"'), $command);
# replace multiple spaces with one
$command = preg_replace('#(\s){2,}#is', ' ', $command);
# escape shell metacharacters
$command = escapeshellcmd($command);
# execute convert program
exec($command);
}
It is used
I gathered a php class from
http://net.tutsplus.com/tutorials/php/c ... -with-php/
Which has some of the Instagram filters available, but not the most popular, like this one X Pro II.
I am doing a website that is a social network in which I plan on incorporating the options to apply filters to photos.
So far I have 6 filters working in PHP.
Gotham
Toaster
Nashville
Lomo-fi
LordKelvin
Tilt Shift
7 more filters for which I have the ps actions file.
Brannan
Earlybird
Hefe
Inkwell
Sutro
Walden
X Pro II
Out of 21 total filters to my knowledge - I do not have an iPhone or smart phone but looks as it is the complete list of filters right now for Instagram - I am missing any kind of direction/source to create the following 8 filters:
Rise
Valencia
Amaro
Hudson
Lo-fi
Sierra
1977
Willow
Also there are adobe lightroom presets very cheap for purchase which I do not know if these would contribute in something for the missing 8 above or for a better understanding compared to the ps actions which seem need some editing as marked with an asterisk on the action names for some of the filters:
http://reallyniceimages.com/?p=21
http://reallyniceimages.com/wp-content/ ... edding.jpg
Except for Lomo-fi, Gotham and Tilt Shift - which I already have as PHP - the package contains all presets for all the rest of the filters, only those three and Willow are missing.
Willow can be purchased separately as well:
http://reallyniceimages.com/?p=799
-If those presets could be of any help I'd just buy them.
I want to take to PHP the imagemagick exec commands to do the 7 filters for which I have the ps action file and later the 8 missing filters. Only problem is I do not have resources in the moment to hire someone for the work and it doesn't look right now I might be able to accomplish it myself without lots of time.
I also checked your website for some filters which I would likely implement such as "cartoons", "sketch" and "wooden" - directing first to you for commercial approval.