История изменений
Исправление Deleted, (текущая версия) :
pip install opencv-python
???
$ cat gm-rgb2bgr.sh
#!/bin/sh
src="$1"
if [ -z "$src" ]
then
echo "Usage: $0 file.png"
else
gm convert "$src" -channel red "$src.red.png"
gm convert "$src" -channel green "$src.green.png"
gm convert "$src" -channel blue "$src.blue.png"
gm composite -compose CopyRed "$src.blue.png" "$src.green.png" "$src.bgr.png"
gm composite -compose CopyBlue "$src.red.png" "$src.bgr.png" "$src.bgr.png"
rm -f "$src.red.png" "$src.green.png" "$src.blue.png"
fi
Исправление Deleted, :
pip install opencv-python
???
$ cat gm-rgb2bgr.sh
#!/bin/sh
src="$1"
if [ -z "$src" ]
then
echo "Usage: $0 file.png"
else
gm convert "$src" -channel red "$src.red.png"
gm convert "$src" -channel green "$src.green.png"
gm convert "$src" -channel blue "$src.blue.png"
gm composite -compose CopyRed "$src.blue.png" "$src.green.png" "$src.bgr.png"
gm composite -compose CopyBlue "$src.red.png" "$src.bgr.png" "$src.bgr.png"
rm -f "$src.red.png" "$src.green.png" "$src.blue.png"
fi
Исходная версия Deleted, :
pip install opencv-python
???
$ cat gm-rgb2bgr.sh
#!/bin/sh
src="$1"
gm convert "$src" -channel red "$src.red.png"
gm convert "$src" -channel green "$src.green.png"
gm convert "$src" -channel blue "$src.blue.png"
gm composite -compose CopyRed "$src.blue.png" "$src.green.png" "$src.bgr.png"
gm composite -compose CopyBlue "$src.red.png" "$src.bgr.png" "$src.bgr.png"
rm -f "$src.red.png" "$src.green.png" "$src.blue.png"