Function Repository Resource:

ImageASCII

Source Notebook

Convert an image to ASCII art

Contributed by: Karen Danielyan (karen_danielyan@outlook.com) and Mikayel Egibyan (mikayele@wolfram.com)

ResourceFunction["ImageASCII"][img]

converts img to an ASCII art representation and returns a string.

ResourceFunction["ImageASCII"][img,prop]

converts img to an ASCII art representation and returns the result as the specified prop.

Details and Options

ResourceFunction["ImageASCII"] only works with 2D images.
ResourceFunction["ImageASCII"] performs grayscale ASCII art by first converting img to grayscale.
Possible settings for prop include:
"Grid"a Grid of characters
"Image"an Image object,including rasterized characters
"Text"a single string (default)
The following options can be specified:
FontSize12font size to use when rasterizing ASCII characters
"ProcessingFunction"Automaticpreprocessing applied to the image
RasterSizeAutomaticresize img before processing
By default, img is preprocessed using HistogramTransform[ImageAdjust[img]].

Examples

Basic Examples (2) 

Convert an image into a string:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/37a87359-b737-447a-b167-172cec11b9af"]
Out[1]=

Check the output type:

In[2]:=
Head[%]
Out[2]=

Scope (3) 


Convert an image into a structured Grid of copyable characters:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/59a032e1-d814-4e26-baa7-fd572b5265cc"]
Out[3]=

Check the output type:

In[4]:=
Head[%]
Out[4]=

The output contains formatted characters:

In[5]:=
InputForm[%%] // Short
Out[19]=

Convert an image into an ASCII art raster:

In[20]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/06dfd100-2650-4c8d-a262-61008cfe8731"]
Out[20]=

Options (6) 

FontSize (2) 

Specifying a custom font size for the character rasterization may result in a better recovered output:

In[21]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/ccad9c72-460f-4927-8553-78b77bef2ae6"]
Out[21]=

On the other hand, a larger font size might improve the time complexity:

In[22]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/00d378b0-3bbe-4482-9fca-9cd89173f189"]
Out[22]=

ProcessingFunction (2) 

By default, a combination of image processing operations is performed to preprocess the input image:

In[23]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/5f86c636-6979-4488-b65b-f2d8adfb5b49"]
Out[23]=

Using a custom preprocessing function affects the output quality:

In[24]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/3da2b4a5-d507-4801-b462-a3724d214529"]
Out[24]=

RasterSize (2) 

By default, the input image dimensions are preserved:

In[25]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/195f4ecc-406c-4860-895a-3b6642e76f90"]
Out[25]=
In[26]:=
asciiimg // ImageDimensions
Out[26]=

Resize the image:

In[27]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/2facebf5-84cc-4f75-9a7d-7a4da3e98c68"]
Out[27]=
In[28]:=
asciiimg // ImageDimensions
Out[28]=

Applications (2) 

Grab an image:

In[29]:=
i = \!\(\*
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJzt3fl/VGX2J/CemV/mx/kX5r+YX+fH+XH6Oza1b0kqgMgSoMV2ARdwB1Tw
+1VR0a+KbIoiKC5giyKgjaCACu0CgYDaSkjIWkvm3PskRUHq3vss51lu1Uk/
zQtDKKoqt9518jnnPvd/lhb9ufxf//SnPy397/DLn4u3/+++vuId//Y/4D9u
Wbh0Xu/Cnu7/s3BZT29P3/8q/Tf45CT8/9p/+dOfvN9fuHjB4rp0aSBwXb4U
tH755XLQ+vVXWL8Erd9++zVo/etfv4Us9gW///6vkPXHH78HrStX/ohcVwev
hK+hq4ORi33Z8NBViXVteEhxjVwbtr5GR65JL+t3Hpb6d0Huuz88FH10eSvq
KOU51P2PwBdL+Kus8WIMf7W2XCEywAI9QmwJ5ihYsEsDdnW1uAZCYHfMdjik
QlX/15UrgceqSduHLKl+7Zq3XHYba2m33X8mFd9hJYRnf0XddliDUcKH2+5/
QbTwErZHCu9/YNo+0Jm8DwQX7cGqX74c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ENW3nPKbnbquuO4qRVF0ljUGF
vZ3TGLKdx3bc7F1ceOn5GRLeUdXlchinKnayPUYLPXUP6neE2y7dV1UMZ5R5
15u9X5tJ4B0RPg7a40seH9WjYY884M1HMQppTCBBsrvHtJXtF7BT9xDbfd6R
95mxbLsE72LT76q2mxLeBefdVV3adlzYyfYOSNpn8c4YR0pmpEciFfqqYYdc
OO+R56s6Ur2rJPC6hTdl/vXbNPlYVEmPf8Ueo/7pLyGqB6cxsKwjrGlJXJLJ
Kdsjq3c4LsN4R+iraq/e1RN488K3cl5+mb/nCLW6G7CrV+y/64nZHbG9/dKY
JtsDNv5VSma0BO9WpiJ1VO/yBbzbKU17LATVZb+5okeR4lTMVbWNBWxEMXJp
TKBvA+1btMPytikO4Z1s11C9D/knfcvmM8MoNTw5r0V1hXIdv2JXg70TbG/j
or2x5FJ38zMzmvZ4x8ner+qejcQX3jqnjiy7qouX6xEX2rCbsZuHPax/GnzV
vPYu2htLLnU3PzOjz3ak7F34RSqbwOPkM53sfPOjRrDdXA6jPWPvCNs7o2hn
a2BAOHW3Fc6EH1eWJ2f8Zah615DStLfzuM+SYgKDH8Lwqa4vY1dRPQR22f5p
5ybtsxfZjlO9i9uuLjyuWu3kvL5nxqDqaLZrzdhjZHvnFO1s6UlmdOxFEBnO
hB2chrqr0hGNYzV8fIXX4rnpWp1L9eGo/di5YY944TgVxcilMQOdV7SzFXim
anxsZ4V9h9quuYZ3WXszj1r9u6OlXMeAPdL2xosr7rb322bWyroYMuseKrwO
3qOEjyjdr1xRqt4jXyxXea7WZE94fTW8O9ob8ly5VmdvCs5W7JE5TGTFrg12
TNU7M2lvXnGxnf2p1uwdpYBnXyP1usYQ3mAlj+u/9bs6glGly9bqV1nNEH2A
ccDOUa4rVeyNF2MsbLer6/8H4pIBDA==
"], {{0, 250.}, {500., 0}}, {0, 255},
       
ColorFunction->RGBColor,
ImageResolution->72],
BoxForm`ImageTag["Byte", ColorSpace -> "RGB", Interleaving -> True],
Selectable->False],
DefaultBaseStyle->"ImageGraphics",
ImageSizeRaw->{500., 250.},
PlotRange->{{0, 500.}, {0, 250.}}]\);

Create an ASCII art version of the image:

In[30]:=
ascii = ResourceFunction["ImageASCII"][i, "Text", FontSize -> 4];

Export the result:

In[31]:=
Export["ascii.txt", ascii]
Out[31]=

Use the conversion result as a code comment:


Import a GIF image from the web:

In[32]:=
i = Import["https://wolfr.am/QlbJ2mlZ", "ImageList"];
ListAnimate[i]
Out[32]=

Generate an ASCII art version for each of the frames:

In[33]:=
ascii = ResourceFunction["ImageASCII"][#, "Image", RasterSize -> 600, FontSize -> 5] & /@ i;
ListAnimate[ascii]
Out[33]=

Possible Issues (3) 

Using a new font requires rasterizing a new ASCII character set, which might be slow:

In[34]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/319429c3-4999-4d00-b832-1d2a0ae97f3c"]
Out[34]=

Using the same font a second time is much faster:

In[35]:=
AbsoluteTiming[
 ResourceFunction["ImageASCII"][RandomImage[1, {900, 502}], FontSize -> 50];]
Out[35]=

The final output image size might not exactly match the input image size:

In[36]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/5c91390b-3376-4498-b58b-68712cce520b"]
Out[36]=
In[37]:=
ResourceFunction["ImageASCII"][i, "Image"] // ImageDimensions
Out[37]=

Any font size smaller than 4 doesn't produce readable characters when outputting an Image:

In[38]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/fe1b264a-c310-47f6-9aba-f37d3106d96e"]
Out[38]=

Neat Examples (3) 

Take a high-resolution image:

In[39]:=
i = Import["https://wolfr.am/QlbHkPnQ"];
In[40]:=
ImageDimensions[i]
Out[40]=
In[41]:=
ImageResize[i, 300]
Out[41]=

Convert to ASCII art with a very small font size:

In[42]:=
AbsoluteTiming[
 ascii = ResourceFunction["ImageASCII"][i, "Image", FontSize -> 4, ImageSize -> 300]]
Out[42]=

Blend the ASCII version with the original image to get a high quality colored ASCII art raster:

In[43]:=
coloredASCII = ImageCompose[ascii, {i, 0.2}];
ImageResize[coloredASCII, 300]
Out[43]=

Publisher

Karen Danielyan

Version History

  • 1.0.0 – 20 November 2020

Source Metadata

Related Resources

License Information