Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kelvins/imgproc
:mount_fuji: Go package that provides simple image processing functions
https://github.com/kelvins/imgproc
golang image-processing
Last synced: about 1 month ago
JSON representation
:mount_fuji: Go package that provides simple image processing functions
- Host: GitHub
- URL: https://github.com/kelvins/imgproc
- Owner: kelvins
- License: mit
- Created: 2016-12-11T14:37:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T00:28:01.000Z (over 7 years ago)
- Last Synced: 2024-11-09T11:35:08.487Z (3 months ago)
- Topics: golang, image-processing
- Language: Go
- Homepage:
- Size: 373 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
imgproc
==========================[![Build Status](https://circleci.com/gh/kelvins/imgproc.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/kelvins/imgproc)
GoLang package that provides simple image processing functions.
Use:
`go get github.com/kelvins/imgproc`
Functions:
----- [X] IsGrayscale
- [X] ToGrayscale
- [X] ConvertImageToSlice
- [X] ResizeImage
- [X] SaveImage
- [X] LoadImage
- [X] LoadMultipleImagesExample:
----``` go
import (
"fmt"
"log"
"github.com/kelvins/imgproc"
)img, err := imgproc.LoadImage("./face.png")
if err != nil {
log.Fatal(err)
}grayscaleImage := imgproc.ToGrayscale(img)
err = imgproc.SaveImage(grayscaleImage, "./face.png")
if err != nil {
log.Fatal(err)
}if imgproc.IsGrayscale(grayscaleImage) {
fmt.Println("It is a grayscale image")
} else {
fmt.Println("It is not a grayscale image")
}imageSlice := imgproc.ConvertImageToSlice(grayscaleImage)
resizedImage, err = imgproc.ResizeImage(grayscaleImage, 100, 100)
if err != nil {
log.Fatal(err)
}
```Dependency:
----It uses the `imaging` package to resize the image.
`github.com/disintegration/imaging`