Page 1 of 1

Multiple pipes

Posted: 2019-09-09T13:53:00-07:00
by goaway
Hi,

I've been trying for some time to pipe Fred's scripts together with the convert command in bash to alter a series of images in a certain way, but have not been successful. I would like to start with running a convert command, then use the output form the convert command in Fred's script, then use the output form Fred's script in a second convert command. I want to avoid to create temporary files which will then have to be deleted, and I want to execute the commands in this particular order.

Here I have provided a simplified example:

Code: Select all

convert logo: -colorspace gray jpg:- | bash midtonebalance.sh -rc -10 -gm 0 -by 50 -p - jpg:- | convert - -colorspace RGB output.jpg
I'm thrown the following error each time, and I can't figure out how to get around it:

Code: Select all

convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3273.
What am I doing wrong? Is it not possible to nest these commands through multiple pipes?

Re: Multiple pipes

Posted: 2019-09-09T14:37:19-07:00
by fmw42
Comment out line 260: echo "shape=$shape; gain=$gain;" and try again. It is that echo that is causing the issue.

Re: Multiple pipes

Posted: 2019-09-10T07:21:54-07:00
by goaway
fmw42 wrote:
2019-09-09T14:37:19-07:00
Comment out line 260: echo "shape=$shape; gain=$gain;" and try again. It is that echo that is causing the issue.
Wow. That worked wonders. Thank you so much!