Created
November 16, 2022 09:57
-
-
Save mebjas/b2ec7a5d82c9e119228203d8c16649ce to your computer and use it in GitHub Desktop.
Skeleton of JNI file for reading image in native layer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <jni.h> | |
// Corresponding to NativeImageLoader class in | |
// dev.minhazav.samples package. | |
extern "C" JNIEXPORT jstring JNICALL | |
Java_dev_minhazav_samples_NativeImageLoader_readFile( | |
JNIEnv* env, jclass, jint fd) { | |
if (fd < 0) { | |
return env->NewStringUTF("Invalid fd"); | |
} | |
// TODO: read the image. | |
return env->NewStringUTF("Dummy string"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment