I am a beginner in C # , however I was able to compile version 1.6 to use a
Windows CE project. I want to generate templates for finger from bitmap. I
am unable to use the AsImageData property (because it is the only available
in CF) .
I do this : myfinger.AsImageData ConvertBitmap = ( flag ) ;
But the program crashes immediately at runtime.
How should we use to generate the fingerprint AsImageData ?
ConvertBitmap () is a method to convert Bitmap as array of bytes .
Below is the source of the method ConvertBitmap
private byte  ConvertBitmap ( Bitmap bitmap)
/ / Code excerpted from Microsoft Robotics Studio v1.5
Raw BitmapData = null; / / used to get attributes of the picture
byte  rawImage = null; / / the picture as a byte 
/ / Freeze the picture in memory
Bitmap.LockBits raw = (
new Rectangle ( 0, 0, (int) Bitmap.Width , (int)
int size = * raw.Height raw.Stride ;
rawImage = new byte [ size] ;
/ / Copy the picture into the byte 
System.Runtime.InteropServices.Marshal.Copy ( raw.Scan0 ,
rawImage , 0 , size) ;
if ( raw! = null)
/ / Unfreeze the memory for the picture
bitmap.UnlockBits ( raw) ;
rawImage return ;
Is this question any different from your previous one?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.