private void CreateDB() { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "JPG|*.jpg|PNG|*.png"; openFileDialog.Multiselect = true; openFileDialog.ShowDialog(); List <UserFingerprint> userFingerprints = new List <UserFingerprint>(); foreach (String file in openFileDialog.FileNames) { Bitmap bitmap = (Bitmap)Bitmap.FromFile(file); bitmap = Thinning.Thin(bitmap); List <Minutiae> minutiaes = GetMinutiaesFromBitmap(bitmap); userFingerprints.Add(new UserFingerprint(file, minutiaes)); } Fingerprints fingerprints = new Fingerprints(userFingerprints); DbJSONSerializer db = new DbJSONSerializer(); db.WriteToFile(db.SerializeMinutiaes(fingerprints), "db_fingerprints.json"); }