return to table of content

ASCII Silhouettify

acureau
3 replies
21h8m

The Wendy's logo is slightly horrifying

mock-possum
0 replies
16h18m

Whoa worth scrolling down for

michaelcampbell
0 replies
5h46m

They're in alphabetical order, for anyone wanting to hop around.

doublerabbit
1 replies
21h5m

Oh, the Z one is very clever.

Almost gives you another perspective in to icon graphic design.

None4U
0 replies
19h4m

You mean the Zorin OS logo?

rixrax
5 replies
1d

On stock rPi5 running this takes > 3 seconds. Three seconds to render 370 x 370, 8-bit/color RGBA image to ASCII on a 2.4GHz CPU. And this is my lead-in to rant about neofetch, which takes about 0.2 seconds to run on the same Pi (see below), which would also be the time it would slow down opening a shell should I put neofetch into my .profile. Lastly, it takes cat to cat output of neofetch to /dev/null about ~0.01 seconds, which also is the time that neofetch should probably take to run (and really, this tool too).

  $ time ascii-silhouettify -i neofetch-1.png > /dev/null
  real 0m1.817s
  user 0m3.541s
  sys 0m0.273s
  $ time neofetch > out.txt
  real 0m0.192s
  user 0m0.118s
  sys 0m0.079s
  $ time cat out.txt > time
  real 0m0.001s
  user 0m0.001s
  sys 0m0.000s

lalaithion
1 replies
1d

Surely the use case for this tool is to precompile your image into ASCII and then just output that on every shell start up, right? There’s no reason to convert the image every time.

malka
0 replies
21h17m

It could be fun for realtime

fwlr
0 replies
19h35m

The algorithm involved is actually very hefty: for each cell of a 9px by 15px grid over the image, compare each pixel of the cell to its equivalent pixel in each of the 95 ascii characters. To solve for optimal grid alignment, it repeats this for each of the 9x15 possible positionings of the image under the grid.

arp242
0 replies
23h53m

I would assume that performance wasn't the prime concern, but rather the accuracy/appearance of the generated image. Most people aren't putting this in their shell startup, just as most people aren't putting an ffmpeg encode command in their shell startup.

And I would assume neofetch is relatively slow because getting some of the system information is relatively slow. e.g. to get the GPU name it does "lspci -mm":

  % time lspci -mm >/dev/null
  lspci -mm > /dev/null  0.03s user 0.03s system 2% cpu 2.993 total
  % time lspci -mm >/dev/null
  lspci -mm > /dev/null  0.03s user 0.01s system 76% cpu 0.053 total
Guess it's faster that second time due to kernel cache or whatnot, but 50ms is still fairly slow. And that's only the GPU.

adamrezich
0 replies
1d

It's a Node application, I don't know why you expected high performance

belter
5 replies
23h46m

There they are again with their npm. Great project but why? What happened to a normal install...

wruza
0 replies
19h57m

Yeah, what happened to it. Or not happened. I npm/yarn link my own cli repos everywhere because setting up anything else takes hours and is a mess. I even develop python scripts with `nodemon main.py` (lol) because only n-guys know what people need, it seems.

phist_mcgee
0 replies
18h29m

npm really is a feat of engineering how well it works across systems. Say what you want about the npm ecosystem, the package manager itself is brilliant.

jameshart
0 replies
23h37m

You don’t need to install it at all. Just run it via npx.

hombre_fatal
0 replies
14h18m

Tell me which method you mean by "normal install" and I'll tell you the problem.

Cthulhu_
0 replies
23h26m

What alternative do you propose? NPM works the same way everywhere; there is no other package manager that is as crossplatform and ubiquitous as NPM.

f33d5173
4 replies
1d

                        _,
                   ,<g g__
             _ _ @ %g[   @
         ,   @ ]P@ @_) "
  g"" ,*'g   @ %r"
  @p  "@ @ "
  @Lm

fallingsquirrel
2 replies
1d

EaJd8S ?

f33d5173
1 replies
1d

The farther away from your computer you stand, the clearer it becomes. It might help knowing it's a small part of a company logo on the examples page.

maicro
0 replies
1d

"Est. 1885" is what it looks like when scaling this page down to 10%.

mmastrac
0 replies
23h59m

I had to cheat and look at the examples page -- it's part of the Dr. Pepper logo.

enigmarc
4 replies
22h51m

If you love ASCII-related art then I'm sure you'll like this animated ASCII tool (GIF to ASCII):

https://www.gifcii.fun

(full disclosure: I made it)

naet
1 replies
21h32m

For someone who loves gifs this is really fun.

It would be cool if you could save it somehow, maybe as another gif or video.

sphars
0 replies
4h36m

I definitely want to see the ability to save it as a gift so that I can reupload it and do it again. And again. And again...

lying4fun
0 replies
20h17m

this is amazing, thank you

lucgagan
0 replies
21h15m

Woah, this is very _fun_!

xenodium
3 replies
22h15m

oooh, this is timely. I'm working on a blogging service where you can set ASCII art as its home page header at https://lmno.lol

I was delited to find a figlet js port at https://github.com/patorjk/figlet.js, which I use to generate default headers for new blogs. You can see it on my blog https://lmno.lol/alvaro or new ones like https://lmno.lol/ivyink and https://lmno.lol/stormsprite.

Looking forward to playing with silhouettify and other suggestions in comments.

pvorb
2 replies
21h49m

Those ascii art headers don't look correct on my phone. I'm using Firefox on Android, so that might only affect a limited group of people. But I think it should just be working with a <pre> tag and a monospace font, right?

xenodium
0 replies
21h41m

Ooh, thanks for reporting that! Looking into it. It should look something like this https://imgur.com/a/V55N1f1 (Safari/iOS).

unclad5968
0 replies
20h44m

Same here. Brave on android

teddarific
2 replies
1d1h

This is really neat. Have always wondered how these work under the hood / the algorithm behind them.

Would love a web version that's easily usable though; as much as I live in the terminal, just too much of a mental burden installing a new package.

teddarific
0 replies
1d

Oh amazing, no idea how I missed that green button LOL. Was too excited about the details.

wormius
1 replies
16h5m

Back in my day we had to print this out on lined paper and it was snoopy and playboy centerfolds, and no color for miles around.

prattatx
0 replies
15h29m

This. I walked into the computer room with my mom when I was a little kid. There was a dude printing out a pinup and taking pictures of it as the lines fed. My first exposure to porn.

ZeroGravitas
0 replies
8h13m

Nice.

I wonder if you could do something creepy by starting with a standard log tail output and then slowly introducing more and more visible patterns before, I dunno, a scary face appearing out of the text.

memalign
1 replies
23h41m

I made a similar tool (for making game sprites that can be embedded directly in code):

https://memalign.github.io/m/pceimage/index.html

Works on the web and colorized ASCII output can be edited. It can be a bit fiddly though: need to manually turn off Wobble and adjust the pixel sampling size to get a good result.

zellyn
0 replies
22h25m

That's really fun. I love it! One recommendation: it might be nice to add a mode where it doesn't wobble, but retains the cuteness that results from thickening and rounding corners.

lawlessone
1 replies
23h44m

feels like an 80s/90s version of what future tech companies etc would look like with all those logos

m463
0 replies
19h0m

I have the 80's feel too...

but it feels to me like an 80's version of a unix app that needed plain ascii because it couldn't copy the PC line drawing characters, maybe like this (random example):

https://i.stack.imgur.com/0sRMM.jpg

hernandipietro
1 replies
1d

awesome algorithm, curved features seem to be perfectly reproduced by each ASCII character density and geometry.

kevin_thibedeau
0 replies
21h27m

Should have backslashes in lower left and upper right quadrants. Also apostrophe instead of period in lower half.

hazn
1 replies
1d1h

absolutely cool stuff!

if we hackers have an aesthetic, it’s ascii and demo scene. truly beautiful things we can be proud of

sneak
0 replies
14h14m

Let’s not forget phosphor green on black, as standard-borne primarily by jwz’s website.

andrewstuart
1 replies
23h14m

How would these images look if each character was a pixel? Worse?

sbarre
0 replies
6h32m

Definitely worse because not every character maps to a pixel. The use of different characters is designed to represent spaces that have groupings of different coloured pixels in different configurations.

You could try to output everything using the ASCII block character and that would give you a close approximation.

aendruk
1 replies
22h37m

It’s nice how / forms a neat edge on parts of the Disney logo. I imagine that effect must be sensitive to grid alignment. It would be helpful to have a live preview for choosing the most aesthetically pleasing alignment.

ZeroGravitas
0 replies
8h10m

I wondered about alignment too. The homepage mentions that it tries various shifted grids and picks the best one, I guess based on some metrics of best fit.

sneak
0 replies
14h18m

A word to the site operator: the examples page is not rendering in a monospaced font for me (iOS with lockdown enabled), perhaps try including a safe css fallback monospaced font?

panzi
0 replies
6h0m

Very cool stuff! I wrote something vaguely similar recently that displays images in the terminal using Unicode block elements and 24 bit ANSI colors, but I just assume two pixel per character. I support scaling and animated GIFs: https://github.com/panzi/ansi-img#readme

But those character based logos somehow look more impressive. My thing just looks low-res. XD

lsllc
0 replies
18h24m

There's going to be a lot of editing to /etc/motd and/or /etc/issue today!

lavataco
0 replies
42m

There’s always stuff these converters don’t do well. Check out ascii art for the past 30 years at the 16 colors archive: https://16colo.rs/

landswipe
0 replies
17h33m

Brilliant work, this problem has been solved before, but in this case, it seems to take it a little further in terms of quality.

hi-v-rocknroll
0 replies
19h19m

The web version never finishes (Chromium-based browser), but the CLI version works.

https://meatfighter.com/ascii-silhouettify/spa/index.html#/

Obligatory pandering:

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@ @@@@[@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@N

hhh
0 replies
20h59m

This is awesome. I love ASCII (and ANSI) art, but recently have been working on creating forms for Space Station 14. Sadly, SS14 does not use a monospaced font for papers.

I have been using ASCGEN2, which lets me specify a font, but this seems much nicer. Does anyone know if there's something similar that lets you specify a font and try to find the best fit?

geor9e
0 replies
17h27m

Did it get the hug of death? It's taking forever…

WaitWaitWha
0 replies
1d1h

'What has been, it is what will be, And what has been done, it is what will be done. So there is nothing new under the sun.'

Nicely done. We used to print birthday banners and pictures using EBCDIC & ASCII on continuous-paper band- then dot-matrix printers, in a very similar fashion, recognizing the 'density' of characters, once printed.

SillyUsername
0 replies
1d

Great job reminds me of Telnet Matrix but with colour :) (Edit also just found this https://ascii.theater/ )

I wrote something similar a few years ago for a retro computer image converter using a fixed font from that computer, it also did dithering prior to character conversion as it resulted in finer gradients for photos.

https://github.com/KodeMunkie/imagetozxspec/blob/master/src/...