Search found 93 matches

by chaoscarnage
2016-10-29T11:25:47-07:00
Forum: Users
Topic: Trim image and return trimmed amount
Replies: 15
Views: 9834

Re: Trim image and return trimmed amount

snibgo wrote:What error messages do you get? Your "exec" isn't capturing error messages. Why not?
I had shell_exec, there was no message at all.
by chaoscarnage
2016-10-29T10:57:21-07:00
Forum: Users
Topic: Trim image and return trimmed amount
Replies: 15
Views: 9834

Re: Trim image and return trimmed amount

Sure you can have the output have the same name as the input. But it will overwrite your input. So make backups. It's not working for me. I have tried both with and without composite and the image simply does not get replaced. Is there something I am doing wrong? exec('convert ' . $path['temp'] . '...
by chaoscarnage
2016-10-29T10:47:15-07:00
Forum: Users
Topic: Trim image and return trimmed amount
Replies: 15
Views: 9834

Re: Trim image and return trimmed amount

How would I apply a trim where I hand it x to img, x from img, y to, y from? For that, use "-crop". I have crop working, I cannot save it out as the same image name though. Is this possible? shell_exec('convert ' . $path . 'df845d8bf95dabb50c71da3255.png -crop ' . $test[0] . 'x' . $test[1] . '+' . ...
by chaoscarnage
2016-10-29T08:23:01-07:00
Forum: Users
Topic: Trim image and return trimmed amount
Replies: 15
Views: 9834

Re: Trim image and return trimmed amount

Fantastic, this is what I am using to get the vars, shell_exec('convert ' . $build_img . '.png -format "%[fx:page.x] %[fx:page.width - page.x - w] %[fx:page.y] %[fx:page.height - page.y - h]" -trim info:-')); then I foreach them and have the lowest possible vars. Now, all I need to be able to do is ...
by chaoscarnage
2016-10-28T19:00:52-07:00
Forum: Users
Topic: Trim image and return trimmed amount
Replies: 15
Views: 9834

Trim image and return trimmed amount

Even if the trim must come later, is there anyway to find out how much of an image has been trimmed on each side? I need it to compare to images, so they can be trimmed the same amount and resized. My thought right now is to trim the images, then compare the sizes, but that will not tell much how mu...
by chaoscarnage
2015-08-23T16:41:03-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

Also can I just casually call -compose in between overall calls like so? convert \ -compose Dst_Out \ source2.png \ subsource1.png -composite \ subsource2.png -composite \ +write mpr:convert_result_1 \ +delete \ source3.png \ subsource1.png -composite \ +write mpr:convert_result_2 \ +delete \ -compo...
by chaoscarnage
2015-08-23T16:36:34-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

snibgo wrote: At the end, you have "-composite" with no "-compose" setting, so this will also be "Dst_Out".

The default setting of "-compose" is "Over".
This looks to be why it wasn't working. A million thank yous!
by chaoscarnage
2015-08-23T16:02:01-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

Makes sense. Does that mean that there needs to be some parenthesis added to get the following to work Because of your odd usage of parenthesis (of the first post), I cannot figure it out what you want to accomplish. It looks you have 7 input files (img.png, img_1.png, img_2.png, img_3.png, out1_1....
by chaoscarnage
2015-08-23T13:13:37-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

In your parenthesis processing, the -composite only has one image to work on, so that is why it fails. You do not need the parentheses to do what you want. You would need the parenthesis if you needed to combine your image_1 in the first parentheses with some other image, or if you wanted to do som...
by chaoscarnage
2015-08-23T12:34:17-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

Even just trying to straight run in linux through command line I cannot get the expected result with parenthesis. With the code below convert \ img.png \ \( img_1.png -composite \) \ \( img_2.png -composite \) \ img.png This however works fine convert \ img.png \ img_1.png -composite \ img_2.png -co...
by chaoscarnage
2015-08-23T09:18:16-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

snibgo wrote:Sorry, I forgot to use "+write" above. Now corrected.

I don't know PHP. Is "\" a line-continuation character?
Currently in order to get it to work I removed the '\' too. I Didn't note that properly :? Apologies.
by chaoscarnage
2015-08-23T07:55:58-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

I thought the initial script in the OP worked but It looks like it does not. I can't seem to get it to run without the following error. I tried running the following using PHP exec(). convert \ img.png \ \( img_1.png -composite \) \ \( img_2.png -composite \) \ target.png Spits back the following at...
by chaoscarnage
2015-08-23T06:01:22-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Re: Convert inside convert, want to use result of inner converts without writing to disk

So something like this would work then? Also how do I clear out the mpc file when im done with it? I would like to clear it asap. convert \ img_2.png \ \( out_1.png -compose Dst_Out -composite \) \ \( out_2.png -compose Dst_Out -composite \) \ mpr:convert_n | convert \ img.png \ \( img_1.png -compos...
by chaoscarnage
2015-08-23T05:26:57-07:00
Forum: Users
Topic: Convert inside convert, want to use result of inner converts without writing to disk
Replies: 18
Views: 10626

Convert inside convert, want to use result of inner converts without writing to disk

I've been working on batching my imagemagick commands in my program into an exec script and want to do as few writes to disk as possible. Currently I have chained a simple combination as follows and it works great. convert \ img.png \ \( img_1.png -composite \) \ \( img_2.png -composite \) \ ... \( ...