| 136 | } |
| 137 | |
| 138 | std::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 | |
| 150 | static Orientation GetOrientation(JNIEnv* env, jobject exifInterface) { |
| 151 | if (exifInterface == nullptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected