@@ -18,7 +18,7 @@ ansi terminal colors.
18
18
- The encoder `enc` specifies which kind of unicode represenation
19
19
should be used.
20
20
21
- - The `colordepth` can either be `TermColor256 ()` or `TermColor24bit()`
21
+ - The `colordepth` can either be `TermColor8bit ()` or `TermColor24bit()`
22
22
and specifies which terminal color codes should be used.
23
23
24
24
- `maxheight` and `maxwidth` specify the maximum numbers of
152
152
"""
153
153
ascii_encode([stream], img, [depth::TermColorDepth], [maxsize])
154
154
155
- Displays the given image `img` using unicode characters and
156
- terminal colors (defaults to 256 colors).
155
+ Displays the given image `img` using unicode characters and terminal colors.
157
156
`img` has to be an array of `Colorant`.
158
157
159
158
If working in the REPL, the function tries to choose the encoding
@@ -193,55 +192,4 @@ function ascii_encode(
193
192
end
194
193
end
195
194
196
- """
197
- ascii_encode([stream], img, [depth::TermColorDepth], [maxsize])
198
-
199
- Displays the given image `img` using unicode characters and
200
- terminal colors (defaults to 256 colors).
201
- `img` has to be an array of `Colorant`.
202
-
203
- If working in the REPL, the function tries to choose the encoding
204
- based on the current display size. The image will also be
205
- downsampled to fit into the display (using `restrict`).
206
- """
207
- function ascii_encode (
208
- io:: IO ,
209
- img:: AbstractArray{<:Colorant} ,
210
- colordepth:: TermColorDepth ,
211
- maxsize:: Tuple = displaysize (io))
212
- # otherwise, use our own implementation
213
- print_matrix (io, x) = ascii_encode (io, x, colordepth, maxsize)
214
- Base. show_nd (io, img, print_matrix, true )
215
- end
216
-
217
- ascii_encode (io:: IO , img, args... ) = ascii_encode (io, img, colormode[], args... )
218
- ascii_encode (img, args... ) = ascii_encode (stdout , img, colormode[], args... )
219
- ascii_encode (io:: IO , img, colordepth:: TermColorDepth , args... ) = throw (ArgumentError (" imshow only supports colorant arrays with 1 or 2 dimensions" ))
220
-
221
- """
222
- ascii_encode256([stream], img, [maxsize])
223
-
224
- Displays the given image `img` using unicode characters and
225
- the widely supported 256 terminal colors.
226
- `img` has to be an array of `Colorant`.
227
-
228
- If working in the REPL, the function tries to choose the encoding
229
- based on the current display size. The image will also be
230
- downsampled to fit into the display (using `restrict`).
231
- """
232
- ascii_encode256 (io:: IO , img, args... ) = ascii_encode (io, img, TermColor256 (), args... )
233
- ascii_encode256 (img, args... ) = ascii_encode256 (stdout , img, args... )
234
-
235
- """
236
- ascii_encode24bit([stream], img, [maxsize])
237
-
238
- Displays the given image `img` using unicode characters and
239
- the 24 terminal colors that some modern terminals support.
240
- `img` has to be an array of `Colorant`.
241
-
242
- If working in the REPL, the function tries to choose the encoding
243
- based on the current display size. The image will also be
244
- downsampled to fit into the display (using `restrict`).
245
- """
246
- ascii_encode24bit (io:: IO , img, args... ) = ascii_encode (io, img, TermColor24bit (), args... )
247
- ascii_encode24bit (img, args... ) = ascii_encode24bit (stdout , img, args... )
195
+ ascii_encode (io:: IO , img:: AbstractArray{<:Colorant} ) = ascii_encode (io, img, colormode[])
0 commit comments