C#C
C#•4y ago•
112 replies
leviathan

Rendering and updating a colormap

I'm developing a library related to real-time image generation. To test it, I'm trying to make an app that can convert a
Color[,]
into an image and display it, updating at 60 fps (Color is a class with 3 float fields).
Ideally, I'd want my code to be like this:
DynamicImage dynImg = new DynamicImage();
every 1/60 seconds do{
  Color[,] colormap = dynImg.getImgAtTime(time);
  imageDisplay.setImage(colormap.convertToImage());
}

where imageDisplay would probably be a PictureBox in a WPF app (with which I have no experience at all).
(This is of course pseudocode)
Any help is greatly appreciated.
Was this page helpful?