F
Fernando Cacciola
For fast image procesign code I need pointers to the elements of a two
dimensional array:
mData = new int[mH,mW];
mScan0 = &mData[0,0];
however, the above won't compile since AFAICT fixed blocks require "local"
pointers:
fixed ( int* lScan0 = &mData[0,0] )
{
// this works
}
while I need the pointer to be a data member of the class (since client
objects use the scanline pointer to access the image).
If the above cannot be done with arrays, are there other block memory
allocation methods?
I figure that this should be possible since
System.Drawing.Imaging.BitmapData contains a field Scan0 which is
effectively a pointer to the Bitmap data array.
TIA
Fernando Cacciola
SciSoft
dimensional array:
mData = new int[mH,mW];
mScan0 = &mData[0,0];
however, the above won't compile since AFAICT fixed blocks require "local"
pointers:
fixed ( int* lScan0 = &mData[0,0] )
{
// this works
}
while I need the pointer to be a data member of the class (since client
objects use the scanline pointer to access the image).
If the above cannot be done with arrays, are there other block memory
allocation methods?
I figure that this should be possible since
System.Drawing.Imaging.BitmapData contains a field Scan0 which is
effectively a pointer to the Bitmap data array.
TIA
Fernando Cacciola
SciSoft