Skip to content

Script to generate colorful text messages out of .ppm images

License

Notifications You must be signed in to change notification settings

seju-v/matrix-pixelart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

matrix-pixelart

Script to generate colorful text messages out of .ppm images for Riot.im

How i use it:

  1. Export an image as a .ppm file

  2. Run the script and copy the output

    $ node matrix-pixelart.js path/to/image.ppm | xclip
    
  3. Run /devtools in Riot.im (matrix client)

  4. Enter 'm.room.message' as the event type

  5. Paste the output in the event content field

  6. Press send and wait a couple of seconds =)

 

Known issues:

  • Different applications encode ppm files in different ways, this script contains was only tested with files generated by GIMP and imagemagick(commented out). You might need to adjust a couple of variables if your file isn't correctly parsed.

  • Because each pixel (1:1 aspect ratio) gets transformed into a block character (vertical aspect ratio), expect your source images to become deformed. A workaround is to stretch the image out horizontally before exporting.

  • Matrix instances don't usually support very long messages, if you want to send a very tall image it might be a good idea to split it in chunks.

  • Riot.im will wrap long lines, so be careful to keep the width of your input image to a minimum

About

Script to generate colorful text messages out of .ppm images

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published