Convert region in current image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
leos2009
Posts: 15
Joined: 2015-08-25T07:50:55-07:00
Authentication code: 1151
Location: Ukraine, Kiev
Contact:

Re: Convert region in current image

Post by leos2009 »

the same code in PHP
Image is not work

code algorithm from the past
Image and it's work
Last edited by leos2009 on 2015-09-07T08:47:06-07:00, edited 1 time in total.
User avatar
leos2009
Posts: 15
Joined: 2015-08-25T07:50:55-07:00
Authentication code: 1151
Location: Ukraine, Kiev
Contact:

Re: Convert region in current image

Post by leos2009 »

Code: Select all

exec('/opt/local/bin/convert files/triangles3.png \( -clone 0 -fill "gray(50%)" -colorize 100% \) \( -clone 0 -fill black -colorize 100% \) \( -clone 2 -fill white -draw "translate 180,123 path 'M 127,163 L 122,201 L 100,201 Z'" -alpha off -motion-blur 0x0-90 -blur 0x35 -clone 1 +swap -compose plus -composite \) -delete 2 -compose over -define compose:args=-0x0 -compose displace -composite files/1441640604.png');
Not work in php
Where is the error in this code?. Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert region in current image

Post by snibgo »

In your PHP screen shots, the first has line-end backslashes inside the quotes, so the backslashes are put into the string, so it doesn't work.

The second example has backslashes between strings, so it is an instruction to PHP to join up the lines. The string doesn't contain those backslashes, so this works.
snibgo's IM pages: im.snibgo.com
User avatar
leos2009
Posts: 15
Joined: 2015-08-25T07:50:55-07:00
Authentication code: 1151
Location: Ukraine, Kiev
Contact:

Re: Convert region in current image

Post by leos2009 »

Thanks Snibgo! it's work
User avatar
leos2009
Posts: 15
Joined: 2015-08-25T07:50:55-07:00
Authentication code: 1151
Location: Ukraine, Kiev
Contact:

Re: Convert region in current image

Post by leos2009 »

Final video https://youtu.be/7vTzTTCUnNg

used: javascript, bootstrap-slider, php, Image Magick(server side image convert), OpenCV 3.0 (Linux version), Facedetect PHP Extension
FMW Scripts: BUMP LIPS, MESHWARP GRID
And many code standart IM command :-)

Thanks World of IM
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert region in current image

Post by fmw42 »

Very nice application of some of my scripts.
Post Reply