Giter VIP home page Giter VIP logo

rgb-matrix's Introduction

RGB-Matrix

Render a display RGB matrix from a source image.


Dependency:

Pillow - https://pillow.readthedocs.io/en/stable/


Usage:

RGB-Matrix.py [-h] [-f] [-w] [-H] [-b] [-B]
positional arguments:
Filename of a single source-image, or directory for batch processing.

optional arguments: -f , --format Export File-Format (.jpg or .png) -w , --width Width of each Individual Pixel (R-G-B). -H , --height Height of each individual Pixel (R-G-B). -b , --block Block-Size defines the overall size of the repeated Pixel-Pattern. -B , --black Shift brightness of black pixels to simulate backlight shining - otherwise no pixels are visible in black areas. Value between 0-100 (0 = black 100 = white) -rH, --resizedWidth, Width of the resized image. (Optional) -rH, --resizedHeight, Height of the resized image. (Optional)


If you execute the script without optional arguments, these settings are used:

-w 2 -H 5 -b 7 -B 0 -f .jpg

Supported file formats for source image:
.bmp, .jpeg, .jpg, .png, .tiff, .tif, .webp


Resizing a Image:

Consider block size before resizing because resizing applies after the effect is done, so it resizes the final resut not the original file.
Result Size (without resizing) = Original Size * Block Size


First part of the image is resized while considering the result size but the second part of it resized without considering as you see there is significant difference between these two examples so resized image size should be one of the multiples of result size.

Tips:

  • Two output formats are supported (.jpg & .png). Choosing png as output file format results in a pretty clean matrix, while the compression for .jpg results in a more realistic, organic look.
  • A pretty low resolution is recommended for the source image. The effect is more visible that way.
  • Sometimes changing black pixel brightness can help getting better results when resizing.

rgb-matrix's People

Contributors

ldr8 avatar yussufbiyik 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.