public void executePreProcessingStep1(bool student) { if (VisionDLL.executePreProcessingStep1(task, student)) { IntPtr image = VisionDLL.getResultPreProcessingStep1(task); preProcessing1 = VisionDLL.getBitmapFromRGBImage(image); VisionDLL.imageFreeRGB(image); return; } throw new FaceRecognitionTask.FaceRecognitionException("Pre-Processing step 1: failed!"); }