mirror of
https://gitee.com/openharmony/multimedia_image_framework
synced 2024-11-23 15:10:26 +00:00
修改跨平台判断
Signed-off-by: zhujingru <zhujingru2@huawei.com>
This commit is contained in:
parent
f68017e8f0
commit
3a7f52c4b3
@ -778,6 +778,8 @@ uint32_t PixelMap::SetRowDataSizeForImageInfo(ImageInfo info)
|
||||
} else {
|
||||
SetRowStride(pixelBytes_ * info.size.width);
|
||||
}
|
||||
#else
|
||||
SetRowStride(pixelBytes_ * info.size.width);
|
||||
#endif
|
||||
rowDataSize_ = pixelBytes_ * info.size.width;
|
||||
}
|
||||
|
@ -805,7 +805,7 @@ STATIC_EXEC_FUNC(CreatePixelMapFromSurface)
|
||||
if (IMG_NOT_NULL(context->rPixelMap)) {
|
||||
context->status = SUCCESS;
|
||||
} else {
|
||||
context->status = ERROR;
|
||||
context->status = ERR_IMAGE_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
@ -822,7 +822,7 @@ void PixelMapNapi::CreatePixelMapFromSurfaceComplete(napi_env env, napi_status s
|
||||
}
|
||||
|
||||
if (!IMG_IS_OK(status)) {
|
||||
context->status = ERROR;
|
||||
context->status = ERR_IMAGE_PIXELMAP_CREATE_FAILED;
|
||||
HiLog::Error(LABEL, "New instance could not be obtained");
|
||||
napi_get_undefined(env, &result);
|
||||
}
|
||||
|
@ -157,7 +157,6 @@ struct ImageInfo {
|
||||
ColorSpace colorSpace = ColorSpace::SRGB;
|
||||
AlphaType alphaType = AlphaType::IMAGE_ALPHA_TYPE_UNKNOWN;
|
||||
int32_t baseDensity = 0;
|
||||
int32_t stride = 1;
|
||||
};
|
||||
|
||||
struct FillColor {
|
||||
|
Loading…
Reference in New Issue
Block a user