~dricottone/image2ascii

525a85ee696be44be66eb995882ac830a4eabc91 — 秦世成 6 years ago c3affd9
Update README.md
1 files changed, 26 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +26 -0
@@ 83,6 83,32 @@ func main() {
}
```

convert options

```golang
type Options struct {
	Ratio          float64 .       // Scale Ratio
	ExpectedWidth  int             // Convert the image with fixed width
	ExpectedHeight int             // Convert the image with fixed height
	FitScreen      bool            // Scale the image to fit the tereminal screen
	Colored bool                   // if convert the image to colored ascii
}
```

supported convert function
```golang
// convert a image object to ascii matrix
func Image2ASCIIMatrix(image image.Image, imageConvertOptions *Options) []string {}

// convert a image object to ascii matrix and then join the matrix to a string
func Image2ASCIIString(image image.Image, options *Options) string {}

// convert a image object by input a string to ascii matrix then join the matrix to a string
func ImageFile2ASCIIString(imageFilename string, option *Options) string {}
```



## Sample outputs

| Raw Image                                                                                       | ASCII Image                                                                                                |