-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from FabioKaelin/add-documentation
Add documentation
- Loading branch information
Showing
7 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.inv.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,56 @@ | ||
# TerminalImage | ||
# Terminal Image | ||
|
||
With this package can you display a image in your terminal. | ||
|
||
The height if the generated image is customizable. | ||
|
||
The supported image-types are png (.png), jpeg (.jpg, .jpeg, .jfif), singleframe gif (.gif) and webP (.webp). | ||
|
||
## Usage | ||
|
||
To import the package use `go get github.com/fabiokaelin/terminalimage`. | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/fabiokaelin/terminalimage" | ||
) | ||
|
||
func main() { | ||
imageString, err := terminalimage.ImageToString("img.png", 20, true) | ||
if err != nil { | ||
fmt.Println(err) | ||
return | ||
} | ||
|
||
fmt.Println(imageString) | ||
} | ||
|
||
``` | ||
|
||
## Image Example | ||
|
||
To show the convertion, here is the original image: | ||
|
||
![Icon of the superman soundtrack on spotify](./docs/images/img.png) | ||
|
||
The following are the converte ones: | ||
|
||
64 pixel with pixelsplit on: | ||
|
||
![64 Pixel with pixelsplit on](./docs/images/64-true.png) | ||
|
||
64 pixel with pixelsplit off: | ||
|
||
![64 Pixel with pixelsplit off](./docs/images/64-false.png) | ||
|
||
20 pixel with pixelsplit on: | ||
|
||
![20 Pixel with pixelsplit on](./docs/images/20-true.png) | ||
|
||
20 pixel with pixelsplit off: | ||
|
||
![20 Pixel with pixelsplit off](./docs/images/20-false.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes