Attempting to use JNI with C to speed up image processing. Still buggy.