How to accomplish the X PRO II filter effect of Instagram but with ImageMagick command line instead of PhotoShop
Link to Photoshop tutorial:
http://iamiqbal87.blogspot.com/2012/04/ ... ffect.html
How to do this in ImageMagick, light tutorial on PhotoShop
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to do this in ImageMagick, light tutorial on PhotoSh
1) for the vignette image, draw an ellipse rotated to the size and orientation of the diagonal of the image with fill white on black background (or the opposite) and then blur it appropriately. You will have to look carefully at the ellipse in PS and try to match its major and minor radii and blur.
2) create a hald:8 image in IM and take it to photoshop and open it and apply the same curve settings to it. You can save the settings for any curve and open it for the hald image. Then apply the curve settings to the hald image and save it. Bring it back to IM where you can apply it to your background image using -hald-clut
3) composite the vignette image on the adjusted image
4) add a black border using -border or -shave first and then -border depending upon whether you want the image size to change
2) create a hald:8 image in IM and take it to photoshop and open it and apply the same curve settings to it. You can save the settings for any curve and open it for the hald image. Then apply the curve settings to the hald image and save it. Bring it back to IM where you can apply it to your background image using -hald-clut
3) composite the vignette image on the adjusted image
4) add a black border using -border or -shave first and then -border depending upon whether you want the image size to change
Re: How to do this in ImageMagick, light tutorial on PhotoSh
You are a real genius on this from what I've seen on Fred's ImageMagick Scripts, is it too much to ask you for the command line syntax to achieve these simple steps. With ImageMagick some things are still chinese to me.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to do this in ImageMagick, light tutorial on PhotoSh
lovelf wrote:You are a real genius on this from what I've seen on Fred's ImageMagick Scripts, is it too much to ask you for the command line syntax to achieve these simple steps. With ImageMagick some things are still chinese to me.
It would take me quite some time (hours) to do that as I need to figure out how to match PS ellipse and blurring to get the vignette effect close in IM and also to try to match the curves function.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to do this in ImageMagick, light tutorial on PhotoSh
I can try to work on this, but I have to finish some other projects first. So I cannot say exactly when I will have it done. Perhaps within a week.fmw42 wrote:lovelf wrote:You are a real genius on this from what I've seen on Fred's ImageMagick Scripts, is it too much to ask you for the command line syntax to achieve these simple steps. With ImageMagick some things are still chinese to me.
It would take me quite some time (hours) to do that as I need to figure out how to match PS ellipse and blurring to get the vignette effect close in IM and also to try to match the curves function.
It would be a unix shell script. So if you are on Windows, you or someone else would have to translate the commands to Windows syntax or Bat file or use Cygwin.
What platform are you on and what version of IM are you using?
Re: How to do this in ImageMagick, light tutorial on PhotoSh
I have this PHP code which I am unsure if it does the right vignette fine.
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.
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);
}
Code: Select all
vignette(img_resource, 'none');
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.
Last edited by lovelf on 2012-12-12T12:47:24-07:00, edited 1 time in total.
Re: How to do this in ImageMagick, light tutorial on PhotoSh
I have time to wait, I am on Windows and ImageMagick-6.8.0-8-Q16 but could test on a virtual machine Linux and the final version in the server will be Linux, can try to implement with cygwin for localhost as it is on what I'm developing. But will definitely make the necessary tests on Linux. If you could do a few more after that one with months available for completion (planing to present the website in August/October 2013 and I can do all that is necessary for lesser filters before having all of the filters available), and the company really becomes successful [it is a very good merge between Facebook, Pinterest and now - Instagram] I will contact you.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to do this in ImageMagick, light tutorial on PhotoSh
Please contact me offline at fmw at alink dot net
Re: How to do this in ImageMagick, light tutorial on PhotoSh
Sent you a message as collapablo at gmail dot com