Giter Site home page Giter Site logo

img2chr's Introduction

img2chr

Convert images to NES chr format

Convert any PNG, JPEG or GIF files to 8-bit Nintendo Entertainment System's CHR format.

Quick start

Install the package globally to your machine by running:

npm install -g img2chr

After this you can run the img2chr from anywhere to convert your images to .chr format:

img2chr image.png output.chr

This converts the file image.png to output.chr.

Using as a dependency

You can also use img2chr as a normal NPM dependency:

npm install img2chr --save

This installs the package as a local dependency, after which you can require it in your JavaScript file:

const { img2chr } = require('img2chr')

img2chr('image.png', 'output.chr')

This script above reads the file image.png and saves it as output.chr.

Features

This is a simple tool that:

  • Converts your images to .chr files
  • Reads PNG, GIF and JPG files
  • Converts image to grayscale and uses different grey values as index colors
  • Was created because there was no such tool yet for Node.js
  • Was initially needed for a NES game development for Global Game Jam 2018

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Licensing

The code in this project is licensed under MIT license.

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.