Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 main

import (
"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 main

import (
"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)