Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamsher31/goisimg
Check if filepath is an Image
https://github.com/shamsher31/goisimg
Last synced: 4 days ago
JSON representation
Check if filepath is an Image
- Host: GitHub
- URL: https://github.com/shamsher31/goisimg
- Owner: shamsher31
- License: mit
- Created: 2015-08-16T08:25:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T15:13:43.000Z (about 9 years ago)
- Last Synced: 2023-08-04T09:59:45.681Z (over 1 year ago)
- Language: Go
- Size: 145 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# goisimg
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/shamsher31/goisimg)
Check if filepath is an Image
### How to install
```go
go get github.com/shamsher31/goisimg
```### How to use
```go
package mainimport (
"fmt"
"github.com/shamsher31/goisimg"
)func main() {
fmt.Println(image.Is("./golang.jpg"))
// true
}
```
###Aliasing Imports
If you already have package name ```image``` you can use following.```go
package mainimport (
"fmt"
pckImage "github.com/shamsher31/goisimg"
)func main() {
fmt.Println(pckImage.Is("./golang.jpg"))
// true
}
```
### Related
[goimgext](https://github.com/shamsher31/goimgext)
[go-binary](https://github.com/ferhatelmas/go-binary)
[go-archive](https://github.com/ferhatelmas/go-archive)### Why
This package is inspired by [is-image](https://www.npmjs.com/package/is-image) npm module.# License
MIT © [Shamsher Ansari](https://github.com/shamsher31)