Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/krzko/image-byte-slice-gen

🖼 A Go-based command-line tool to convert images into Go byte slice files
https://github.com/krzko/image-byte-slice-gen

byte-slice golang image image-processing

Last synced: 17 days ago
JSON representation

🖼 A Go-based command-line tool to convert images into Go byte slice files

Awesome Lists containing this project

README

        

# image-byte-slice-gen

A Go-based command-line tool to convert images into [Go](https://go.dev/) byte slice files.

## Usage

Run the utility with the `-f` flag followed by the path to the image file you want to convert:

```sh
image-byte-slice-gen -f path/to/your/image.png
```

This will generate a Go source file with the same name as the image file, containing a byte slice with the image data.

```go
// image.go
package icon

var image = []byte{...}
```