GIF’s and rescaling, repeating across matrix

Hi Guys,

My neighbor and I have constructed a 15x150 matrix of WS2812b’s as part of our holiday lights show. Last year we ran it with a Chinese K-1000c controller and used LedEdit to construct animations, but as the controller is limited to 2048 LED’s (we only ran 12 lines last year) we decided to swap to a RasberyPi and PiPixel hat, and Bibliopixel so we could run more lines.

We’ve managed to work out most of the API, but we were just wondering if there easy ways to create a couple of scenarios...

Is there a way to automatically rescale gifs in ImageAnim to fit the line height of our display? LedEdit uses screen grab for this (in fact most of its anime are shock wave and they render to the matrix format you chose using screen grab style mechanic), but I can’t seem to get ScreenGrab to work from a Bibliopixel project?

As a back up plan we are looking to use 16x16 8 bit style sprites captured in gif and again played back on the LED matrix via ImageAnim. I was wondering if there was an easy way to replicate the 16x16 gif across the span (we have plans for a line of dancing Storm Troopers :-))?

Also is it possible to play a gif via ImageAnim and pan/scroll around the gif image? This can be really effective for scenes which won’t fit on the whole display in one shot.

Is there a good example of how to set the ‘y’ position of scrolling text? Can’t seem to get the yaml syntax right. Is it also possible to do horizontal scrolling?

Last question... what’s the best way to use the full colour resolution of the LED’s? The inbuilt anims seem to quantise to a much smaller range of colours than the LEDs allow (circle pop demo in the docs is a good example... the circle edges are not anti aliased/smoothed)?

Sorry lots of questions!

Answers inline!

Unfortunately, it’s mostly negative, though not entirely.

The original thrust of this is to provide people with a facility to experiment with their own programs to do lighting animation on their own homebrewed system. In many cases, people just prepare their own GIFs to size with tools on their machine.

Many of these would be quite doable in the system as it stands but our development forces are not sufficient to these tasks… Our big task right now is to finish our 85% done documentation but the main developers are simply time-restricted.

And we really appreciate the effort you guys put in! This is an awesome project and if I can find the time I hope to be able to contribute as I’m no stranger to python or graphics and image processing.

Hi Guys,

My neighbor and I have constructed a 15x150 matrix of WS2812b’s as part of our holiday lights show. Last year we ran it with a Chinese K-1000c controller and used LedEdit to construct animations, but as the controller is limited to 2048 LED’s (we only ran 12 lines last year) we decided to swap to a RasberyPi and PiPixel hat, and Bibliopixel so we could run more lines.

We’ve managed to work out most of the API, but we were just wondering if there easy ways to create a couple of scenarios…

Is there a way to automatically rescale gifs in ImageAnim to fit the line height of our display?

There isn’t at this instant - let me look into it though, I might be able to get this out “in an hour or so”.

Can you send me the YAML of how you would “like it to work” :smiley: and then I might make it work as close to that way as possible…?

No guarantees… :smiley:

Something like…

shape: [15, 150]

run:

fps: 60

animation:

typename: BiblioPixelAnimations.matrix.ImageAnim

imagePath:

imageScale: fit_to_x # rescale image to fit X dim

Other options are…

fit_to_y : rescale to fit Y dim

fit_to_xy_warp: rescale to fit X & Y warp the image to fit

fit_to_xy_maint_aspect_ratio : rescale to “best fit” maintaining aspect ratio

First two should be relatively easy to do (Pillow already has resize and requisite filters (actually that’s a point do you need to expose the filter to down/upsample with?).

Nothing quite like designing api’s on the fly :slight_smile:

LedEdit uses screen grab for this (in fact most of its anime are shock wave and they render to the matrix format you chose using screen grab style mechanic), but I can’t seem to get ScreenGrab to work from a Bibliopixel project?

Ah, ScreenGrab the animation? Which system are you working on? It works differently between Windows, Mac and RPi.

RPi… I need to automate this as well so it doesn’t require “human in the loop”, but gimme a rough example and I’ll have a play!

Is there a good example of how to set the ‘y’ position of scrolling text? Can’t seem to get the yaml syntax right.

Voila: https://github.com/ManiacalLabs/BiblioPixel/blob/master/projects/1K.json#L116-L123

Great thanks!

···

On Sun, 23 Dec 2018 at 12:43, Tom Swirly tom@swirly.com wrote:

On Sun, Dec 23, 2018 at 12:47 PM Ed Plowman edplowman@gmail.com wrote:

https://tom.ritchford.com

https://tom.swirly.com