Rendering stream

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
barmalei
Posts: 2
Joined: 2017-04-12T13:31:37-07:00
Authentication code: 1151

Rendering stream

Post by barmalei »

Hello,
I am new to Magick++ and would appreciate your guidance.
My goal is to render a stream on the screen, reading frames from the memory each time.
I am able to display the first image, however, I noticed once I do image.display() it just blocks there.
My question is whether I should draw the content in the same window (and run the display() in a separate thread?) or close the display window after rendering each frame?

I tried searching the board for similar questions but couldn't find any.

Thanks in advance,
Lei
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Rendering stream

Post by snibgo »

As far as I know, image.display() can't be used to write one image after another. It uses X which I don't have so I can't test this.

It is probably fairly simple to write your own functions to (1) create a window, (2) write an image to that window (overwriting any image already there) and (3) close the window.

This is simple with Microsoft Windows, and I get effectively instantaneous changes of image. The specifics will depend on your windowing system, of course.
snibgo's IM pages: im.snibgo.com
barmalei
Posts: 2
Joined: 2017-04-12T13:31:37-07:00
Authentication code: 1151

Re: Rendering stream

Post by barmalei »

Thanks for your feedback snibgo
I am under Linux so things are not that simple, I guess :(
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Rendering stream

Post by snibgo »

If the display program works for you, the source code in MagickWand\display.c contains code to open, write to, and destroy X windows.
snibgo's IM pages: im.snibgo.com
Post Reply