rpi-rgb-led-matrix
rpi-rgb-led-matrix copied to clipboard
gif play
hello master
I have included your rgb led matrix library in my own project, but I want to show gif animation as in image viewer.cpp.
my codes are as below but i am getting errors please can you help me.
Magick::InitializeMagick(*argv); std::vectorMagick::Image img0, imgs; rgb_matrix::ParseOptionsFromFlags(&argc, &argv, &matrix_options, &runtime_opt); device_1.dev_settings(3, 3, 2, 50, 6, 64, 128, 1); // parallel,chain,etc.. matrix = CreateMatrixFromOptions(matrix_options, runtime_opt); off_canvas = matrix->CreateFrameCanvas();
readImages(&img0, "../images/scene1rsz.gif"); Magick::coalesceImages(&imgs, img0.begin(), img0.end()); printf("Hello world!"); while (!interrupt_received) { for (size_t y = 0; y < img0.rows(); ++y) { for (size_t x = 0; x < img0.columns(); ++x) { const Magick::Color &c = img.pixelColor(x, y); off_canvas->SetPixel(x, y, ScaleQuantumToChar(c.redQuantum()), ScaleQuantumToChar(c.greenQuantum()), ScaleQuantumToChar(c.blueQuantum())); } } //device_1.ImgPaint(off_canvas,"scene1rsz.gif",0); off_canvas = matrix->SwapOnVSync(off_canvas); } return 0; }