Skip to content
Simple library for image operations with parallel computing
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
filter.go
filter_test.go
grayscale.go
grayscale_test.go
image.go
image_test.go
moving_objects.go
moving_objects_test.go
utils.go
utils_test.go

README.md

image

Package image implements a simple library for image operations. The library can work with pngs or jpgs. Same functions can be used for both of those image types.

Read more here: http://www.koraygocmen.com/writing-an-image-manipulation-library-in-go-part-1

98% Test coverage


Full Documentation:

https://godoc.org/github.com/KorayGocmen/image

package main

import (
	"fmt"
	"log"

	"github.com/koraygocmen/image"
)

func main() {
	img, _ := image.New("test/test.jpg")

	err1 := img.Grayscale(image.GrayscaleAverage).WriteToFile("test/grayscale_average_method.jpg")
	if err1 != nil {
		log.Fatal(err1)
	}

	err2 := img.Grayscale(image.GrayscaleDesaturation).WriteToFile("test/grayscale_saturation_method.jpg")
	if err2 != nil {
		log.Fatal(err2)
	}

	err3 := img.Grayscale(image.GrayscaleLuma).WriteToFile("test/grayscale_luma_method.jpg")
	if err3 != nil {
		log.Fatal(err3)
	}

	err4 := img.Filter("R", 2).WriteToFile("test/red_color_filtered_200_percent.jpg")
	if err4 != nil {
		log.Fatal(err4)
	}

	// Works both with pngs and jpgs.
	imgPng, _ := image.New("test/test.png")
	fmt.Println(imgPng.Height, imgPng.Width)
}

License

Released under the MIT License.

You can’t perform that action at this time.