MCPcopy Create free account
hub / github.com/Tencent/tgfx / Make

Method Make

src/platform/android/NativeCodec.cpp:138–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138std::shared_ptr<NativeCodec> NativeCodec::Make(JNIEnv* env, jobject sizeObject, int orientation) {
139 auto size = env->GetIntArrayElements(static_cast<jintArray>(sizeObject), nullptr);
140 int width = size[0];
141 int height = size[1];
142 env->ReleaseIntArrayElements(static_cast<jintArray>(sizeObject), size, 0);
143 if (width <= 0 || height <= 0) {
144 return nullptr;
145 }
146 return std::shared_ptr<NativeCodec>(
147 new NativeCodec(width, height, static_cast<Orientation>(orientation)));
148}
149
150static Orientation GetOrientation(JNIEnv* env, jobject exifInterface) {
151 if (exifInterface == nullptr) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected