(wrong string) ée

From: <git_AT_suckless.org>
Date: Sun, 23 Jul 2017 21:55:24 +0200 (CEST)

commit b3bb5072aba43dde81ef4a8364005f5aa0fe0d15
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Sun Jul 23 21:55:07 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Sun Jul 23 21:55:07 2017 +0200

    blind-primary-key: add -k
    
    Signed-off-by: Mattias Andrée <maandree_AT_kth.se>

diff --git a/blind-primary-key b/blind-primary-key
index f1288af..c35af05 100755
--- a/blind-primary-key
+++ b/blind-primary-key
_AT_@ -14,11 +14,12 @@ x=x; y=y; z=z
 ciexyy=0
 zflag=
 grey=0
+keep=0
 
 usage () {
         xyy="-z x1 y1 x2 y2 x3 y3 [white-x white-y]"
         xyz="X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3 [white-X white-Y white-Z]"
- printf 'usage: %s [-1 | -2 | -3] [-g] [%s | %s]\n' "$0" "$xyy" "$xyz" >&2
+ printf 'usage: %s [-1 | -2 | -3] [-gk] [%s | %s]\n' "$0" "$xyy" "$xyz" >&2
         exit 1
 }
 
_AT_@ -40,6 +41,8 @@ while ! test $# = 0; do
                                 x=z; y=x; z=y
                         elif test "$flag" = g; then
                                 grey=1
+ elif test "$flag" = k; then
+ keep=1
                         elif test "$flag" = z; then
                                 ciexyy=1
                         else
_AT_@ -83,6 +86,29 @@ else
         }
 fi
 
+if test $keep = 0; then
+ primary () { blind-from-named -a blind-${pid}-$x "$_AT_"; }
+ keep_primary () { "$_AT_"; }
+else
+ primary () {
+ blind-from-named -a blind-${pid}-$x \
+ blind-tee >(blind-to-named -a blind-${pid}-k) | \
+ "$_AT_"
+ }
+ keep_primary () {
+ if test $x = x; then
+ X=; Y=y; Z=z
+ elif test $x = y; then
+ X=x; Y=; Z=z
+ else
+ X=x; Y=y; Z=
+ fi
+ blind-from-named -f 7 -a blind-${pid}-k \
+ blind-arithm -a$X$Y$Z add /dev/fd/7 | \
+ "$_AT_"
+ }
+fi
+
 if test $grey = 0; then
         finalise () { unconvert; }
 else
_AT_@ -101,16 +127,16 @@ fi
         blind-arithm mul \
                 <(blind-single-colour -f inf -w $width -h $height 0 0 0 1 | \
                         blind-arithm sub \
- <(blind-from-named -a blind-${pid}-$x \
- blind-affine-colour -l \
- <(printf '%s %s %s %s\n' \
- 1 4 4 xyza \
- $o $o $o $o \
- $o $o $o $o \
- $o $o $o $o \
- $E $E $E $o | \
- blind-from-text | \
- blind-repeat inf -))) | \
+ <(primary blind-affine-colour -l \
+ <(printf '%s %s %s %s\n' \
+ 1 4 4 xyza \
+ $o $o $o $o \
+ $o $o $o $o \
+ $o $o $o $o \
+ $E $E $E $o | \
+ blind-from-text | \
+ blind-repeat inf -))) | \
+ keep_primary \
         blind-from-named -f 8 -a blind-${pid}-$y blind-arithm add /dev/fd/8 | \
         blind-from-named -f 9 -a blind-${pid}-$z blind-arithm add /dev/fd/9 | \
         finalise
diff --git a/man/blind-primary-key.1 b/man/blind-primary-key.1
index 6203592..d998edc 100644
--- a/man/blind-primary-key.1
+++ b/man/blind-primary-key.1
_AT_@ -3,7 +3,7 @@
 blind-primary-key - Replace a primary with transparency
 .SH SYNOPSIS
 .B blind-primary-key
-[-1 | -2 | -3] [-g] (-z
+[-1 | -2 | -3] [-gk] (-z
 .I x1
 .I y1
 .I x2
_AT_@ -67,6 +67,9 @@ of the first primary, with transparency.
 Replace the the third primary, instead
 of the first primary, with transparency.
 .TP
+.B -k
+Do not remove the keyed primary.
+.TP
 .B -g
 The video is, with the exception of the keyed primary,
 greyscale and the output video shall remain greyscale.
Received on Sun Jul 23 2017 - 21:55:24 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 23 2017 - 22:02:00 CEST