Code Monkey home page Code Monkey logo

ascii-art's Introduction

ASCII art

Loads BMP images and displays them in ASCII art. Multiple images can be played as animation.

This project is a coursework for Programming and Algorithmics 2 at FIT CTU.

Specification

The program:

  • Loads 1 to n images of BMP format and renders them to command-line in grey scale ASCII art.
  • Maps pixel color (whiteness) of 0 to 255 to ASCII character via map loaded from a file.
  • Gets filenames of the map file and 1 to n bitmaps as command-line arguments.
  • Features color inversion and brightness adjustment filters.
  • Features animation player (in case of more than 1 image) and trivial animation editation tools in the form of switching or removing frames.
  • Features animation playback in forward or backward direction.
  • Implements custom BMP parser.
  • Lets user play/pause the animation, change the speed and direction of the playback and frame-by-frame skipping.
  • Uses NCurses library for rendering to command line.

Usage

Assuming you have make installed, run these commands to:

Compile and run

cd {REPOSITORY_ROOT}
make compile
./hodulrom <map> <image> [more_images...]

You can use {REPOSITORY_ROOT}/examples/map.txt as a map file and {REPOSITORY_ROOT}/examples/nyan{1,2,3,4,5,4,3,2}.bmp as a sample animation.

Generate documentation

cd {REPOSITORY_ROOT}
make doc

then navigate to {REPOSITORY_ROOT}/hodulrom/doc/index.html with your favourite web browser.

Clean generated files

cd {REPOSITORY_ROOT}
make clean

Controls

Key Description
Escape Exit.
Arrows left/right Jump to previous/following frame.
Arrows up/down Navigate in the UI.
Spacebar Play/pause animation playback.
Ctrl + Spacebar Play/pause animation playback in backward direction.
F Increase framerate.
Ctrl + F Decrease framerate.
X Mark/Unmark current frame as skipped (removed) from playback.
S Switch frames. First press marks first frame, second press second frame that switches order with the first one.
A Add image filter.
Enter Performs action in the menu (edit selected item, accept selection...).
Delete Remove selected filter.

ascii-art's People

Contributors

romanhodulak avatar

Stargazers

 avatar Junekey Jeon avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.