Skip to content

Commit

Permalink
Merge branch 'dithering'
Browse files Browse the repository at this point in the history
* dithering:
  New Dithering Mode and updated vendor libraries packages
  • Loading branch information
eliukblau committed Dec 16, 2017
2 parents 0604f32 + c6f57ea commit da11ccd
Show file tree
Hide file tree
Showing 492 changed files with 60,885 additions and 28,709 deletions.
44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,52 @@
___ _____ ____
/ _ \/ _/ |/_/ /____ ______ _ Made with love by Eliuk Blau
/ ___// /_> </ __/ -_) __/ ' \ github.com/eliukblau/pixterm
/_/ /___/_/|_|\__/\__/_/ /_/_/_/ v1.1.1
/_/ /___/_/|_|\__/\__/_/ /_/_/_/ v1.2.0
```

# `PIXterm` - *draw images in your ANSI terminal with true color*

**`PIXterm`** ***shows images directly in your terminal***, recreating the pixels through a combination of [ANSI character background color](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) and the [unicode lower half block element](http://en.wikipedia.org/wiki/Block_Elements). If image has transparency, an optional matte color can be used for background.
**`PIXterm`** ***shows images directly in your terminal***, recreating the pixels through a combination of [ANSI character background color](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) and the [unicode lower half block element](http://en.wikipedia.org/wiki/Block_Elements). If image has transparency, an optional matte color can be used for background. Also, you can specify a dithering mode; in which case, the image is rendered using block elements with different shades, or using standar ASCII characters in the same way. In dithering mode, the matte color is used to fill background of the blocks o characters.

The conversion process runs fast because it is parallelized in all CPUs.

Supported image formats: JPEG, PNG, GIF, BMP, TIFF, WebP.


#### Cool Screenshots

![Screenshot 1](screenshot1.png)
##### No Dithering (Classic Mode)

![Screenshot 2](screenshot2.png)
![Screenshot 1](screenshot01.png)

![Screenshot 3](screenshot3.png)
![Screenshot 2](screenshot02.png)

![Screenshot 4](screenshot4.png)
![Screenshot 3](screenshot03.png)

![Screenshot 5](screenshot5.png)
![Screenshot 4](screenshot04.png)

![Screenshot 6](screenshot6.png)
![Screenshot 5](screenshot05.png)

![Screenshot 6](screenshot06.png)

#### Requirements
Your terminal emulator must be support *true color* feature in order to display image colors in a right way. In addition, you must use a monospaced font that includes the lower half block unicode character `▄ (U+2584)`. I personally recommend [Envy Code R](http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released). It's the nice font that shows in the screenshots.
##### Dithering with Blocks

![Screenshot 7](screenshot07.png)

![Screenshot 8](screenshot08.png)

![Screenshot 9](screenshot09.png)

##### Dithering with Characters

![Screenshot 10](screenshot10.png)

![Screenshot 10](screenshot11.png)

![Screenshot 10](screenshot12.png)

#### Requirements
Your terminal emulator must be support *true color* feature in order to display image colors in a right way. In addition, you must use a monospaced font that includes the lower half block unicode character: `▄ (U+2584)`. I personally recommend [Envy Code R](http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released). It's the nice font that shows in the screenshots. If you want to use the dithering mode with blocks, the font must also includes the following unicode characters: `█ (U+2588)`, `▓ (U+2593)`, `▒ (U+2592)`, `░ (U+2591)`. The dithering mode with characters works with standar ASCII chars.

#### Dependencies

Expand All @@ -45,12 +60,12 @@ All dependencies are directly included in the project via [Go's Vendor Directori

###### Dependencies for `ANSImage` Package

- Package [colorful](github.com/lucasb-eyer/go-colorful): `github.com/lucasb-eyer/go-colorful`
- Package [imaging](http://github.com/disintegration/imaging): `github.com/disintegration/imaging`
- Package [webp](http://godoc.org/golang.org/x/image/webp): `golang.org/x/image/webp`
- Package [bmp](http://godoc.org/golang.org/x/image/bmp): `golang.org/x/image/bmp`
- Package [tiff](http://godoc.org/golang.org/x/image/tiff): `golang.org/x/image/tiff`


#### Installation

*You need the [Go compiler](http://golang.org) version 1.6 or superior installed in your system.*
Expand All @@ -59,19 +74,18 @@ Run this command to automatically download sources and install **`PIXterm`** bin

`go get -u github.com/eliukblau/pixterm`


#### About

**`PIXterm`** is a terminal toy application that I made to exercise my skills on Go programming language. If you have not tried this language yet, please give it a try! It's easy, fast and very well organized. You'll not regret :D

*This application is inspired by the clever [termpix](http://github.com/hopey-dishwasher/termpix), implemented in [Rust](http://www.rust-lang.org).*
*This application is originaly inspired by the clever [termpix](http://github.com/hopey-dishwasher/termpix), implemented in [Rust](http://www.rust-lang.org).*

*The dithering mode is my own port of the [Processing Textmode Engine](http://github.com/no-carrier/ProcessingTextmodeEngine)'s render.*

#### License

[Mozilla Public License Version 2.0](http://mozilla.org/MPL/2.0)


#### Contributors

- [@disq](http://github.com/disq) - Original code for image transparency support.
Expand Down
Loading

0 comments on commit da11ccd

Please sign in to comment.