Skip to content

Commit 41b8764

Browse files
author
asenrt
committed
+r90
1 parent 9a51003 commit 41b8764

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

FilesCore/ImageFlip.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Flip : IUtil
1111
public string Name => "flip";
1212
public string Info =>
1313
"Flips images from a map file or the current dir and saves the results in destination dir. " + Environment.NewLine +
14-
"Args: not interactive (-ni), map file [paths] (-map), out-dir (-out), mode (-mode) {h,v,hv} " + Environment.NewLine +
14+
"Args: not interactive (-ni), map file [paths] (-map), out-dir (-out), mode (-mode) {h,v,hv,r90} " + Environment.NewLine +
1515
" [horizontal, vertical, both], search pattern [*.jpg] (-sp), result file prefix [opt] (-prf), suffix [opt] (-sfx) ";
1616

1717
public int Run(RunArgs ra)
@@ -33,7 +33,7 @@ public int Run(RunArgs ra)
3333
if (paths != null && paths.Length > 0)
3434
{
3535
Utils.ReadString("Destination folder: ", ref dest, true);
36-
Utils.ReadString("Mode [h, v or hv]: ", ref mode, true);
36+
Utils.ReadString("Mode [h, v, hv or r90]: ", ref mode, true);
3737

3838
if (Array.IndexOf(MODES, mode) < 0) throw new ArgumentNullException("-mode", "Incorrect mode");
3939
Utils.ReadString("Result image filename prefix [optional]: ", ref prf, false);
@@ -121,6 +121,7 @@ void flip()
121121
case "h": bmp.RotateFlip(RotateFlipType.RotateNoneFlipX); break;
122122
case "v": bmp.RotateFlip(RotateFlipType.RotateNoneFlipY); break;
123123
case "hv": bmp.RotateFlip(RotateFlipType.RotateNoneFlipXY); break;
124+
case "r90": bmp.RotateFlip(RotateFlipType.Rotate90FlipNone); break;
124125
default: return;
125126
}
126127

@@ -143,6 +144,6 @@ void flip()
143144
string fmap, dest, prf, sfx, mode;
144145
string sp = "*.jpg";
145146
string[] paths = null;
146-
readonly string[] MODES = new string[] { "h", "v", "hv" };
147+
readonly string[] MODES = new string[] { "h", "v", "hv", "r90" };
147148
}
148149
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ files -p ext -ni -sp *.png -ext jpg
6868
not interactive (-ni)
6969
map file [text file with paths on each line] (-map)
7070
out-dir (-out)
71-
mode (-mode) {h,v,hv} [horizontal, vertical, both]
71+
mode (-mode) {h,v,hv,r90} [horizontal, vertical, both, 90deg right]
7272
search pattern [*.jpg] (-sp)
7373
result file prefix [opt] (-prf)
7474
suffix [opt] (-sfx)

0 commit comments

Comments
 (0)