gfic 1.0.8691

dotnet tool install --global gfic --version 1.0.8691
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local gfic --version 1.0.8691
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=gfic&version=1.0.8691
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package gfic --version 1.0.8691
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

gfic

A .NET Core command line image processor that I started for no other reason than to learn F#.

The tool will scan the specified input folder for image files, resize the image by percentage if specified, apply the specified effect, and then save them to the specified output folder. The tool has multi-threading support where you can specify the maximum degree of parallelism but will by default only run on a single thread

Supported effects
  • grayscale
  • blackwhite
  • lomograph
  • kodachrome
  • oilpaint
  • box blur
  • gaussian blur
  • gaussian sharpen
  • glow
  • invert
  • pixelate
  • polaroid
  • sepia
  • vignette

Installation

The tool can be installed as a .NET Core global tool that you can call from the shell / command line

dotnet tool install --global gfic

or by following the instructions here to install a specific version of tool

Usage

USAGE: gfic [--help] [--effect <name>] [--format <format>] [--input <path>] [--output <path>] [--threads <number>] [--resize <percentage>]

OPTIONS:

    --effect, -e <name>   Specify the image processing effect. Available effects are grayscale, blackwhite, lomograph, kodachrome,
                          oilpaint, boxblur, gaussianblur, gaussiansharpen, glow, invert, pixelate, polaroid, sepia, vignette, all
    --format, -f <format> File format (jpg, png, bmp, gif)
    --input, -i <path>    Specify a folder for source images
    --output, -o <path>   Specify the output folder.
    --threads, -m <number>
                          Specify the maximum degree of parallelism. Default is 1
    --resize, -r <percentage>
                          Resize the image by percentage
    --help                display this list of options.

Examples

Here's an example of how an original image might look like

Before

Then after applying some effects
gfic --input .\ --output .\output --effect grayscale

After

gfic --input .\ --output .\output --effect lomograph

After

gfic --input .\ --output .\output --effect oilpaint

After

gfic --input .\ --output .\output --effect gaussiansharpen

After

gfic --input .\ --output .\output --effect sepia

After

gfic --input .\ --output .\output --effect vignette

After

gfic --input .\ --output .\output --effect polaroid

After

It's also possible to apply all supported effects by specifying --effect all

gfic --input .\input\ --output .\output --effect all

00:00:00.1495793 - (grayscale) .\images\guitar1.jpg
00:00:00.0688985 - (blackwhite) .\images\guitar1.jpg
00:00:00.0880889 - (lomograph) .\images\guitar1.jpg
00:00:00.0662329 - (kodachrome) .\images\guitar1.jpg
00:00:00.1943901 - (oilpaint) .\images\guitar1.jpg
00:00:00.1257821 - (boxblur) .\images\guitar1.jpg
00:00:00.1368524 - (gaussianblur) .\images\guitar1.jpg
00:00:00.0871363 - (gaussiansharpen) .\images\guitar1.jpg
00:00:00.0497155 - (glow) .\images\guitar1.jpg
00:00:00.0476376 - (invert) .\images\guitar1.jpg
00:00:00.0564792 - (pixelate) .\images\guitar1.jpg
00:00:00.0675103 - (polaroid) .\images\guitar1.jpg
00:00:00.0488536 - (sepia) .\images\guitar1.jpg
00:00:00.0552082 - (vignette) .\images\guitar1.jpg
00:00:00.0540388 - (grayscale) .\images\guitar2.jpg
00:00:00.0526321 - (blackwhite) .\images\guitar2.jpg
00:00:00.0533533 - (lomograph) .\images\guitar2.jpg
00:00:00.0527740 - (kodachrome) .\images\guitar2.jpg
00:00:00.1286677 - (oilpaint) .\images\guitar2.jpg
00:00:00.0709969 - (boxblur) .\images\guitar2.jpg
00:00:00.0743339 - (gaussianblur) .\images\guitar2.jpg
00:00:00.0773348 - (gaussiansharpen) .\images\guitar2.jpg
00:00:00.0597320 - (glow) .\images\guitar2.jpg
00:00:00.0287875 - (invert) .\images\guitar2.jpg
00:00:00.0150577 - (pixelate) .\images\guitar2.jpg
00:00:00.0156321 - (polaroid) .\images\guitar2.jpg
00:00:00.0128757 - (sepia) .\images\guitar2.jpg
00:00:00.0203237 - (vignette) .\images\guitar2.jpg

Total time: 00:00:01.9884109

This will create sub folders under the specified output folder that describes the applied effect

ls .\output\

    Directory: C:\test\images\output

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        5/19/2019   2:19 PM                blackwhite
d-----        5/19/2019   2:55 PM                boxblur
d-----        5/19/2019   2:55 PM                gaussianblur
d-----        5/19/2019   2:55 PM                gaussiansharpen
d-----        5/19/2019   2:55 PM                glow
d-----        5/19/2019   2:19 PM                grayscale
d-----        5/19/2019   2:55 PM                invert
d-----        5/19/2019   2:19 PM                kodachrome
d-----        5/19/2019   2:19 PM                lomograph
d-----        5/19/2019   2:19 PM                oilpaint
d-----        5/19/2019   2:55 PM                pixelate
d-----        5/19/2019   2:55 PM                polaroid
d-----        5/19/2019   2:55 PM                sepia
d-----        5/19/2019   2:55 PM                vignette

Future

I will add a bunch of CLI arguments for batch image processing operations like: brigten, darken, and the ability to combine multiple images into a collage and apply effects to it

For tips and tricks on software development, check out my blog

If you find this useful and feel a bit generous then feel free to buy me a coffee 😃

This package has no dependencies.

Version Downloads Last updated
1.0.8691 231 12/26/2021
1.0.8685 36 12/26/2021
1.0.7690 42 12/26/2021
1.0.4881 2,848 1/6/2021
1.0.4878 147 1/6/2021
1.0.4715 167 12/28/2020
1.0.623 1,599 6/12/2019
1.0.591 301 5/31/2019
1.0.573 299 5/27/2019
1.0.562 330 5/20/2019
1.0.558 306 5/19/2019
1.0.555 321 5/19/2019
1.0.553 314 5/18/2019
0.1.548 293 5/18/2019
0.1.547 302 5/18/2019
0.1.546 301 5/18/2019
0.0.1.2019051802 306 5/17/2019
0.0.1.2019051801 303 5/17/2019
0.0.1 308 5/17/2019