Multiple pipes

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
Post Reply
goaway
Posts: 2
Joined: 2019-09-09T13:42:00-07:00
Authentication code: 1152

Multiple pipes

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Multiple pipes

Post by fmw42 »

Comment out line 260: echo "shape=$shape; gain=$gain;" and try again. It is that echo that is causing the issue.
goaway
Posts: 2
Joined: 2019-09-09T13:42:00-07:00
Authentication code: 1152

Re: Multiple pipes

Post 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!
Post Reply