Skip to content

angelcaru/printimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

printimg

printimg is a set of command-line tools for manipulating images.

Provided utilities

  • pim prints images to the terminal in an ANSI-encoded fashion. It supports reading images from the filesystem or using piped image data.

  • rim reads images from the filesystem and allows you to pipe them into another program.

  • wim writes piped image data to the filesystem

  • istats prints metadata of a piped image. Currently that is only the resolution

  • blank creates a new image with a specified resolution and, optionally, a background color.

  • rect draws a rectangle

  • line draws a line

  • circle draws a circle

  • crop crops an image

  • resz resizes an image

Examples

blank 400 400 #ff0000 | rect 100 100 100 100 #00ff00 | pim
Create a 400x400 image filled with red, with a green rectangle at (100, 100)

istats C_Logo.png
rim C_Logo.png | istats
Get resolution of C_Logo.png

rim C_Logo.png | rect 100 100 100 100 #ff0000 | pim
Read C_Logo.png, draw a red 100-pixel square at coordinates (100, 100), and print it.

rim C_Logo.png | rect 100 100 100 100 #ff0000 | wim out.png
Same as the above command, but writes the result to out.png. Note that no matter the file extension, it will be encoded in a PNG format. Also note that, although pim prints images in a reduced resolution, the manipulations are done at full scale, as can be observed by using a traditional image viewer.

Compiling

$ cc -o nob nob.c
$ ./nob --parallelize

About

The UNIX philosophy but for images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published