Skip to content

gfilter is a CLI tool to transform an image to any filter such as a greyscale, inverted colors, etc

Notifications You must be signed in to change notification settings

orlandorode97/gofilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Filter

Go Filter is a CLI-tool to transform an image to any filter such a grey-scale, inverted colors etc

How to start

# Clone the repository
git clone https://github.com/OrlandoRomo/go-filter.git

# Change directory to go-filter
cd go-filter

# Install dependencies
go mod tidy

# Build project
cd cmd/go-filter && go build .

Move the binary in your local environment

  • Linux/Mac: sudo mv go-filter /usr/local/bin

Go Filter manual

To use go-filter open a new terminal in your current operative system and type go-filter and enter.

Commands

The go-filter tool integrates the following commands and subcommands

  • filter: filter will apply the given filter name
  • filter's flags
    • --output: Path where the final result will be created. By default is the user directory.
  • filter's subcommands:
    • list: displays all available filter names

      • args: path of the image as a input
    • gray: applies the gray scale effect

      • args: path of the image as a input
    • negative: applies the negative scale effect

      • args: path of the image as a input
    • red: applies the red scale effect

      • args: path of the image as a input
    • blue: applies the blue scale effect

      • args: path of the image as a input
    • green: applies the green scale effect

      • args: path of the image as a input
    • mirror: applies the mirror effect

      • args: path of the image as a input
    • sepia: applies the sepia effect

      • args: path of the image as a input
    • sketch: applies the sketch effect

      • args: path of the image as a input

Examples

Command Result
go-filter filter gray $HOME/Desktop/future_nostalgia.jpg
go-filter filter negative $HOME/Desktop/future_nostalgia.jpg
go-filter filter red $HOME/Desktop/future_nostalgia.jpg
go-filter filter blue $HOME/Desktop/future_nostalgia.jpg
go-filter filter green $HOME/Desktop/future_nostalgia.jpg
go-filter filter mirror $HOME/Desktop/future_nostalgia.jpg
go-filter filter sepia $HOME/Desktop/future_nostalgia.jpg
go-filter filter sketch $HOME/Desktop/future_nostalgia.jpg
go-filter filter sharp $HOME/Desktop/future_nostalgia.jpg

TODO

  1. Refactor the whole CLI using interfaces
  2. Some filters are taking a little bit of time. Need to apply go's concurrency
  3. Add more filters
  4. Fix some bugs in blur effect

About

gfilter is a CLI tool to transform an image to any filter such as a greyscale, inverted colors, etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages