Skip to content

Raster Image Support

Michael Miller edited this page Nov 28, 2020 · 6 revisions

There are several objects exposed that help manage images. They each provide a solution to managing and rendering image data onto the strip.

The NeoBuffer is basic image storage object. It can store the image data in RAM or reference image data stored in PROGMEM. It provides direct x,y access to set and get pixels along with a render method Blt() that will copy bits to the NeoPixelBus or other Raster objects. The internal memory storage matches the pixel layout of the NeoPixelBus which provides a fast moving of pixels to the strip.

The NeoVerticalSpriteSheet is used to abstract that the image actually contains a series of sprites of the same size. It can store the image data in RAM or reference image data stored in PROGMEM. It provides direct sprite,x,y access to set and get pixels along with a render method Blt() that will copy a sprite to the NeoPixelBus or other Raster objects. The internal memory storage matches the pixel layout of the NeoPixelBus which provides a fast rendering.

The NeoBitmapFile is used to "stream" parts of a bmp file to a target. It does not store image data in memory. It provides direct x,y access to get pixels along with a render method Blt() that will copy the image bits to the NeoPixelBus or other Raster objects.

NeoDib

The NeoDib is used to contain an image in memory as a Device Independent Bitmap. The internal memory is in RgbColor/RgbwColor format. While it is not a raster (x,y) format, it is listed here for completeness.

Image Plug In

To create the PROGMEM data structure that contains your image, you can use the free Paint.Net program with the Arduino NeoPixel Sketch Exporter Paint.Net plugin. These tools will export your images into a .h file. An example image and files are present with the NeoPixelBufferCylon example.

Clone this wiki locally