Modified Darts to register callbacks to process images