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

https://github.com/exu/goimgdata

Img to to data URI in Go lang
https://github.com/exu/goimgdata

Last synced: over 1 year ago
JSON representation

Img to to data URI in Go lang

Awesome Lists containing this project

README

          

# img content to data URI in go lang

## Usage:

Save example code to some file e.g. `convert.go`

package main

import (
"github.com/exu/goimgdata"
"os"
"fmt"
)

func main() {
filename := os.Args[1]
fmt.Println(goimgdata.Convert(filename))
}

next run `go build convert.go` command in your shell, next run
`./convert PATH_TO_YOUR_JPG_GIF_PNG_IMAGE_FILE`

You'll need golang (in ubuntu `sudo apt-get install golang`)