View Full Version : Load an image into ICImagingControl

March 14, 2012, 09:59:41
I am trying to load an image into the control, so that the other functions of our applications can be used offline (i.e. without a camera attached to the computer). This is my code:

Stream st = new FileStream("temp", FileMode.Open);

int byData = st.ReadByte();
int i = 0;

while (byData != -1)
icCamSetup.ImageActiveBuffer.SetByteData(i++, (byte)byData);
byData = st.ReadByte();

Now, this works fine if a camera has already sent an image to the control. However, before that happens icCamSetup.ImageActiveBuffer is equal to 'null'. Is there a way to generate a dummy ImageActiveBuffer without a camera attached? Or is there a completely different way to deal with this that would work better?

Stefan Geissler
March 14, 2012, 10:30:11

There is no way to create a dummy or standalone image buffer. IC Imaging Control was not created for post image processing, therefore, this is not implemented.

If you want to test image processing, you may create an array of bytes, that has the same structure than the image buffer array you use.

March 14, 2012, 10:38:43
So there is no way to display an image?

Stefan Geissler
March 14, 2012, 16:38:23
Unfortunately not. I am very sorry for this.