Quick and easy commandline tool for simple image editing. It probably wont replace your photoshop any time soon but for a quick brightness adjustment why not. Supports PNG and JPEG
to build run go build imago.go
Choose input file: -f
Choose output file: -o
Select mode: -m
Currently supported modes:
inverse
greyscale
brightness (requires value between -255 and 255 given with -n flag)
Add Brightness
./imago -f image.jpg -m brightness -n 50 -o new.png
Inverse color
./imago -f image.jpg -m inverse -o new.png
Greyscale
./imago -f image.jpg -m greyscale -o new.png
Originally created as homeword to Go Programming course taught by Tero Karvinen http://terokarvinen.com/2020/go-programming-course-2020-w22/
Oringally this only "randomized" colors while i kept that functionality this is much more usefull now. Using the original feature can be done by providing a number with -n flag and omitting the mode. Link to original script: https://github.com/heiskane/golang/tree/master/h4
https://www.socketloop.com/tutorials/golang-get-rgba-values-of-each-image-pixel
https://stackoverflow.com/questions/33186783/get-a-pixel-array-from-from-golang-image-image
https://dev.to/andyhaskell/how-i-made-a-slick-personal-logo-with-go-s-standard-library-29j9
https://github.com/smtnsk/go-course/blob/master/assignments/project/greyscaler.go