gfic 1.1.3

dotnet tool install --global gfic --version 1.1.3                
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.1.3                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=gfic&version=1.1.3                
nuke :add-package gfic --version 1.1.3                

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 😃

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.1.3 55,412 7/31/2023
1.1.2 301 7/22/2023
1.1.1 187 7/22/2023
1.0.8691 6,336 12/26/2021
1.0.8685 270 12/26/2021
1.0.7690 325 12/26/2021
1.0.4881 3,164 1/6/2021
1.0.4878 417 1/6/2021
1.0.4715 433 12/28/2020
1.0.623 1,889 6/12/2019
1.0.591 578 5/31/2019
1.0.573 589 5/27/2019
1.0.562 612 5/20/2019
1.0.558 609 5/19/2019
1.0.555 630 5/19/2019
1.0.553 609 5/18/2019
0.1.548 591 5/18/2019
0.1.547 592 5/18/2019
0.1.546 572 5/18/2019
0.0.1.2019051802 614 5/17/2019
0.0.1.2019051801 552 5/17/2019
0.0.1 631 5/17/2019