PDA

View Full Version : Loading images into a ImageBuffer



Jack Johnson
December 4, 2008, 22:23:20
My application logs images as bmp files (I can change this if necessary)

Ny code process images in imagebuffers as they come from the icImagingControl.

I'd like to test my code by loading the bitmaps stored in files into an ImageBuffer and call my routines.

When I do an

ImageBuffer ib = icImagingControl1.imagebuffer[0];

Which you told me will save this as a copy for later use,

and later do a

ib.bitmap = new Bitmap("myfile.bmp");

I get a "Propert or Indexer cannot be assigned to it is readonly"

How can I do this?

Thanks

Stefan Geissler
December 5, 2008, 09:36:38
The .bitmap is read only. You can not write anything in it. (As the error messages shows).

There is no function availabe for loading bitmaps into an image buffer. You may load a bitmap into a .NET bitmap object and copy it byte by byte into an existing image buffer of IC. I know, this is no as good idea, but it is the way I would do this.