Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.
/ JConsoleImage Public archive

A small Java API to print images (pixelarts) in your console or terminal.

License

Notifications You must be signed in to change notification settings

EweLo/JConsoleImage

Repository files navigation

JConsoleImage

forthebadge forthebadge forthebadge

JConsoleImage is a small Java API to print images (pixelarts) in your console or terminal.

alt text

Installation

  • Jar

You can find the latest jar in the Releases, which you can add as library to your projectbuild.

  • Maven

Coming soon!

Usage

Basic Example

This will print out the image mario.png(12x16) to the console.

ConsoleImage myImage = new ConsoleImage();
  
myImage.setImage("examples/mario.png");
myImage.set8Colors();
   
myImage.build();

Result:

/examples/mario.png

Explications

.setImage(String path)

The string Path can be the path to you image in the Project Build or on your local storage or an URL to an online image. I recommend to use images with a low resolution (Pixelarts), for example 30x20. Each pixel of the weight of your image will need one or two row(s) of the console. The feature of resizing images will come soon!

.setxColors

Possibilities:

  • set8Colors()

Coming soon:

  • set2Colors()
  • set16Colors()
  • set256Colors()
  • setGrayScale()

Some terminals doesn't support colors or only 8 or 16 colors. The Windows Terminal (cmd) doesn't support Ascii colors, but the most Linux terminals or Bash support (256) Colors. See Bash tips: Colors and formatting for more information!

.build()

Prints out your image to the console.

Documentation

You can find the JavaDocs of the Api here.

Contributing

Authors

  • EweLoHD - Founder & Head-Developer

How to contribute

I would really appreciate it if somebody could help me on this project to make it better. Look at the CONTRIBUTING.md for more information.

To-Do

  • Maven Support
  • set2Colors()
  • set16Colors()
  • set256Colors()
  • setGrayScale()
  • Resize Images

License

This project is licensed under the MIT license. See LICENSE.

About

A small Java API to print images (pixelarts) in your console or terminal.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages