From 5435fd050b4e30c970a3ff8026cbed1ffdc84663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E4=B8=96=E6=88=90?= Date: Mon, 29 Oct 2018 23:19:39 +0800 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a89d2c8..d55e131 100644 --- a/README.md +++ b/README.md @@ -119,14 +119,16 @@ type Options struct { 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 {} +type Converter interface { + // convert a image object to ascii matrix + Image2ASCIIMatrix(image image.Image, imageConvertOptions *Options) []string + // convert a image object to ascii matrix and then join the matrix to a string + Image2ASCIIString(image image.Image, options *Options) string + // convert a image object by input a string to ascii matrix + ImageFile2ASCIIMatrix(imageFilename string, option *Options) []string + // convert a image object by input a string to ascii matrix then join the matrix to a string + ImageFile2ASCIIString(imageFilename string, option *Options) string +} ``` ## Sample outputs -- 2.45.2