you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 8 months ago (1 child)

I was kind of interested in doing this for Unicode a while back, which has the potential to provide for a lot more possible characters and thus a lot more-accurate renditions. If you don't care about real-time operation, I suspect that you can do this with off-the-shelf software by just writing a small amount of code to generate an image for each character


a shell script driving ImageMagick could do it


and then feeding it into photomosaic software, like metapixel.

The major limitation is that unless you're just interested in doing this for the text-based aesthetic and are actually rendering and presenting an image to the end user


think something like Effulgence RPG, Warsim, Armoured Commander II, Armoured Commander, Cogmind, SanctuaryRPG, Cataclysm: Dark Days Ahead, Stone Story RPG, Roots of Harmony, and so forth


you can't control the font that the thing is rendered in on the end user's computer. And the accuracy of the rendering degrades the more the typeface used on an end user's computer differs from your own.

It'd probably be possible to build some kind of system that does take into account the differences for different typefaces, scores characters higher based on checking for character similarity across different typefaces.

Note that there are also at least two existing libraries out there


what I can think of off the top of my head


that will do image-to-ASCII conversion


aalib and libcaca, the latter of which has color support. I also posted a tiny program some time back to generate images using the colored Unicode tiles, and I imagine that someone out there probably has a website that does the same thing.

  • source
  • hideshow 1 child comment
  • [–] 3 points 8 months ago

    I apparently actually did two of these on different occasions, using different, restricted Unicode character ranges (ones that only look at the value of the character as a whole, no subpixel rendering). Can't find the (newer) color one, but the black-and-white one:

        ░                                                                         
      ░░░░░░░                                                                     
     ░▒▒▒▒▒▒▒░░░                                                                  
     ░▒▓▓▓▒▒▒░░░░░                                                                
     ░▒▓▓▓▓▒▒▒▒▒░░░░░                                                      ░░░    
     ░▒▓▓▓▓▓▓▓▒▒▒▒▒▒▒░░                                              ░░░░░░░░░░░░░
     ░▒▓▓███▓▓▓▓▒▒▒▒▒▒▒░░                                         ░░░▒▒▒▒▒▒▒▒▒▒▒░░
     ░▒▓▓▓████▓▓▓▒▒▒▒▒▓▒▒░░                                 ░░░░░░▒▒▒▒▒▒▒▒▒▒▓▓▒▒░ 
      ░▒▓▓▓███▓▓▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░             ░░▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▒░  
       ░▒▓▓▓█▓▓▓▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░▒▒▒░░░░░░░░░░░░░▒▒▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▒░   
        ▒▓▓▓██▓▓▓▒▒▒▒▒▒▓▓▓▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▓▓▓▓▓▒▒▒▓▓▓▓▓██▓▓▓▒░    
        ░▒▓▓▓████▓▓▓▓▓▓▓▓▓▓▒░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓▒░     
        ░▒▒▓▓▓████▓▓▓▓▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▓▓▓▓▓▓▒▒▒▓▓▓▓▓▓▓▓▒░       
        ░░▒▓▓▓▓██▓▓▓▒▒▒▒▒░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▓░░        
         ░▒▓▓▓▓▓▓▓▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓▓▓▓███▓▓▓▒░          
          ░▒▓▓▓▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░▒▒▓▓██▓▓▓▓▒░           
            ▒▒▒░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░▒▒▓▓▓▓▓▓▒░            
          ░░░░░░░░░░░░░░▒░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▓▓▓▒░             
          ░▒▒▒░░░░▒▒▒▒░░▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒░░░░░░░░░░▒▒▒▒▒░              
         ░░▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▒▒▒▒▒▒░▒▒▒▓▓▓▒▒▒▒▒░░░░░░░░░░▒▒░               
        ░░▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒░░░░░░░░░▒░░               
        ░░▒▒▒▒▓▓▓▓▓▓▓▒▒▒▒▓▓▓████▓▓▒▒░░░░▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▒▒▒░░░░▒░░               
       ░▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒░░░▒▒▓▓▓▓▒▒░░░░░░░░░▒▓▓████▓▓▓▓▒▒▒▒▒▒░░░░░               
      ░░▒▒▒▓▓▓▓▓▒▒▒▓▓▓▓▓▒▒▒░░░▒▒▓▒▒░░░░░░░░░░░▒▓▓▓▒▒▒▒▒░░▒▒▒▒▒▒░▒░                
        ░▒▒▓▓▓▒▒▒▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░                 
         ░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒░░░░░░░░░░░░░░▒▒▒▒▒▒▓▓▓▒▒░▒▒▒▒░                 
           ░▒▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▒▒▒░░░░░░░░░░░░░░▒▒▒▒▒▒▒▓▓▒▒▒░░▒▒▒░                
            ░▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▓▓▒▒▒▒░░░░░░  ░░░░░▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒░                
             ░▒▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▒▒░░░░░░      ░░░░▒▒▒▒░░▒▒▒▒▓▓▓▓▓▒▒░                
               ░▒▓▓▓▓▓▓▓▒▒▓▓▓▒░░  ░░░░░▒▒▒░░   ░░▒▒░░░▒▓▓▓▓▓▒▒▒▒░                 
                ░▒▒▒▓▓▓▓▓▓▓▓▒░░   ░░▒▓▓▓▓▓▓▒░░  ░░▒▒▒▓▓▓▓▓▒▒▒▒░                   
                     ░▒▒▓▓▓▓▒░   ░▓▓█▓▓▓▒▒▓▓▓▒░  ░▒▒▓▓▓▓▒▒▒▒░                     
                        ▒▒▓▒▒▒░░░▒▓███████▓██▓░   ░▒▓▓▓▒░░                        
                          ▒▒▒▒▒▒▒▒▓████▓▓████▓░   ░▒▒▒░                           
                            ░▒▒▒▒▒▓▓▓██████▓▒▒░░░░                                
                              ░▒▒▒▒▒▓▓▓▓▓▓▓▒▒▒▒░░                                 
                                ▒▒▓▓▓▓▓▓▓▓▓▒░░                                    
                                  ░░▒▒▒▒▒▒░░                                      
    

    Is generated by the program with this uuencoded source:

    source

    begin 644 unicode_image.tar.xz
    M_3=Z6%H```3FUK1&`@`A`18```!T+^6CX"?_!IM=`":8269IV=F-Y,!%M1>4
    MZX(9LR,YMG1:D2XCM%DZ,0N4%>'\;I?0D"7/H:OI15<M6G@8HO/[&((J'=B.
    MXY\G/[7D"Y)B$O)IC]DM9Y@^\4T?'9(.Z.4+7IDF/T0&\7`M5+G#=C!?(>(U
    M+-C2%PZ!"(Q'Z_/D^%"[PVKX:A:OKH5WF?AQ=CD_AAS]<3<THTMC0S8FG\<A
    MZ;A-_9H?)5S'YG5A?0WUQ7FR0+IS\0AEUYY9QFMY?"$);\U%_R0NK(ZZ/Y&J
    MVA;@#O-P.6W8PW']0U"<S'NHB=.(/)OX[<1&UF@M8+GXPGVFQB_+K/WD01ZO
    MO#+E!CK;^`V-WGH^?0V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````19
    !6@``
    `
    end
    

    I've also seen various programs that use the Braille Unicode characters for higher-resolution bitmap rendering, like mapscii, and I suspect that someone's probably written software to convert to that.

  • source
  • parent