未验证 提交 5a44a48c 编写于 作者: O openharmony_ci 提交者: Gitee

!9064 Revert image pixel map ndk api change

Merge pull request !9064 from caochuan/ndk_header_api_revert
......@@ -162,8 +162,7 @@ napi_value ImagePixelMapNDKTest::CreatePixelMap(napi_env env, napi_callback_info
if (!parseCreateOptions(env, argValue[NUM_1], &createOps)) {
return udfVar;
}
int32_t res = OH_PixelMap_CreatePixelMap(env, createOps,
static_cast<uint8_t*>(buffer), bufferSize, &pixelmap);
int32_t res = OH_PixelMap_CreatePixelMap(env, createOps, buffer, bufferSize, &pixelmap);
if (res != OHOS_IMAGE_RESULT_SUCCESS || pixelmap == nullptr) {
return udfVar;
}
......@@ -565,7 +564,7 @@ napi_value ImagePixelMapNDKTest::GetImageInfo(napi_env env, napi_callback_info i
return result;
}
struct OhosPixelMapInfo pixelmapInfo;
OhosPixelMapInfo pixelmapInfo;
int32_t res = OH_PixelMap_GetImageInfo(native, &pixelmapInfo);
if (res != OHOS_IMAGE_RESULT_SUCCESS) {
return result;
......@@ -588,7 +587,7 @@ napi_value ImagePixelMapNDKTest::AccessPixels(napi_env env, napi_callback_info i
return result;
}
uint8_t* pixelAddr = nullptr;
void* pixelAddr = nullptr;
int32_t res = OH_PixelMap_AccessPixels(native, &pixelAddr);
if (res != OHOS_IMAGE_RESULT_SUCCESS || pixelAddr == nullptr) {
return result;
......
......@@ -45,7 +45,7 @@ static napi_value TestAccessPixels(napi_env env, napi_callback_info info)
napi_get_cb_info(env, info, &argCount, argValue, &thisVar, nullptr);
uint8_t* addrPtr = nullptr;
void* addrPtr = nullptr;
OH_AccessPixels(env, argValue[0], &addrPtr);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册