1.包管理工具由npm切换为ohpm

2.适配DevEco Studio: 3.1Release(3.1.3.400)
3.适配SDK: API9 Release(3.2.11.5)

Signed-off-by: zhoulisheng1 <zhoulisheng1@huawei.com>
This commit is contained in:
zhoulisheng1 2023-04-06 19:07:21 +08:00
parent 61ff7a6e3e
commit 29067035bc
17 changed files with 164 additions and 44 deletions

View File

@ -1,5 +1,7 @@
## 1.0.7
## 2.0.0
- 包管理工具由npm切换为ohpm
- 适配DevEco Studio: 3.1Release(3.1.3.400)
- 适配SDK: API9 Release(3.2.11.5)
- 新增开发者可对图片缓存进行全局配置能力
- 新增对OpenHarmony图库的Uri数据加载的能力需要申请图库访问权限和文件读取权限动态申请图库访问权限
- 修复若干问题:

View File

@ -9,7 +9,8 @@
<filteritem type="filepath" name="imageknife/src/main/ets/components/imageknife/utils/gif/parse/lzw.js" desc="使用开源库gifuct-js,使用其默认版权头,无需修改"/>
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加版权头"/>
<filteritem type="filename" name="NOTICE" desc="NOTICE文件不添加版权头"/>
<filteritem type="filename" name="hvigorw.bat" desc="hvigorw配置文件DevEco Studio自动生成不手动修改"/>
<filteritem type="filename" name="hvigorw" desc="hvigorw配置文件DevEco Studio自动生成不手动修改"/>
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Filters for compatibilitylicense header policies">
<filteritem type="filename" name="hvigorfile.js" desc="hvigor构建脚本DevEco Studio自动生成不手动修改"/>
@ -18,6 +19,8 @@
<filteritem type="filepath" name="imageknife/src/main/ets/components/imageknife/utils/gif/parse/lzw.js" desc="使用开源库gifuct-js,使用其默认版权头,无需修改"/>
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加版权头"/>
<filteritem type="filename" name="NOTICE" desc="NOTICE文件不添加版权头"/>
<filteritem type="filename" name="hvigorw.bat" desc="hvigorw配置文件DevEco Studio自动生成不手动修改"/>
<filteritem type="filename" name="hvigorw" desc="hvigorw配置文件DevEco Studio自动生成不手动修改"/>
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Filters for copyright header policies">
</filefilter>

View File

@ -57,6 +57,15 @@
"Owner" : " Yalantis",
"Upstream URL": "https://github.com/Yalantis/uCrop",
"Description": " Image Cropping Library "
},
{
"Name": "js-spark-md5",
"License": "MIT",
"License File": "https://github.com/satazor/js-spark-md5/blob/master/LICENSE",
"Version Number": "v3.0.2",
"Owner" : "satazor",
"Upstream URL": "https://github.com/satazor/js-spark-md5",
"Description": "Lightning fast normal and incremental md5 for javascript"
}
]

View File

@ -18,7 +18,7 @@
## 下载安装
```typescript
npm install @ohos/imageknife --save
ohpm install @ohos/imageknife
```
OpenHarmony npm环境配置等更多内容参考安装教程 [如何安装OpenHarmony npm包](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_npm_usage.md)。
@ -439,10 +439,8 @@ request.skipMemoryCache(true)
<img src="screenshot/gif4.gif" width="50%"/>
## 兼容性
- [DevEco Studio版本](https://developer.harmonyos.com/cn/develop/deveco-studio#download)DevEco Studio 3.1Beta1及以上版本。
- OpenHarmony SDK版本API version 9及以上版本。
## 约束与限制
DevEco Studio: 3.1Release(3.1.3.400), SDK: API9 Release(3.2.11.5)
## 目录结构

View File

@ -2,11 +2,6 @@
"license": "ISC",
"devDependencies": {},
"name": "entry",
"ohos": {
"org": "huawei",
"directoryLevel": "module",
"buildTool": "hvigor"
},
"description": "example description",
"repository": {},
"version": "1.0.0",

View File

@ -1,4 +1,9 @@
## 1.0.0
- 包管理工具由npm切换为ohpm
- 适配DevEco Studio: 3.1Release(3.1.3.400)
- 适配SDK: API9 Release(3.2.11.5)
## 0.1.0
获取图片的buffer数据使用openGL、着色器Shader操作GPU达到图片滤波器的效果
- 支持模糊滤波器
- 支持亮度滤波器

View File

@ -6,7 +6,7 @@
## 下载安装
```
npm install @ohos/gpu_transform --save
ohpm install @ohos/gpu_transform
```
## 例子说明
@ -64,9 +64,10 @@
```
## 兼容性
## 约束与限制
支持 OpenHarmony API version 9 及以上版本。
在下述版本验证通过:
DevEco Studio: 3.1Release(3.1.3.400), SDK: API9 Release(3.2.11.5)
## 贡献代码

View File

@ -14,7 +14,7 @@
"main": "index.ets",
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
"type": "module",
"version": "0.1.0",
"version": "1.0.0",
"tags": [
"Tool"
],

View File

@ -0,0 +1,6 @@
{
"types": "./index.d.ts",
"name": "libentry.so",
"description": "",
"version": ""
}

View File

@ -1,4 +0,0 @@
{
"name": "libentry.so",
"types": "./index.d.ts"
}

View File

@ -0,0 +1,6 @@
{
"hvigorVersion": "2.0.0-s",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "2.0.0-s"
}
}

2
hvigor/hvigor-wrapper.js Normal file

File diff suppressed because one or more lines are too long

48
hvigorw Normal file
View File

@ -0,0 +1,48 @@
#!/bin/bash
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
error() {
echo ""
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
fail() {
error "$@"
exit 1
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi
else
EXECUTABLE_NODE="node"
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
fi
# Check hvigor wrapper script
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
fi
# start hvigor-wrapper script
exec "${EXECUTABLE_NODE}" \
"${HVIGOR_WRAPPER_SCRIPT}" "$@"

57
hvigorw.bat Normal file
View File

@ -0,0 +1,57 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Hvigor startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
set NODE_EXE=node.exe
goto start
:start
@rem Find node.exe
if defined NODE_HOME goto findNodeFromNodeHome
%NODE_EXE% --version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:findNodeFromNodeHome
set NODE_HOME=%NODE_HOME:"=%
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
if exist "%NODE_EXE_PATH%" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:execute
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
:fail
exit /b 1

View File

@ -14,11 +14,11 @@
"main": "index.ets",
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
"type": "module",
"version": "1.0.6",
"version": "2.0.0",
"dependencies": {
"@ohos/disklrucache": "^1.0.0",
"@ohos/svg": "1.1.0",
"@ohos/gpu_transform": "^0.1.0"
"@ohos/disklrucache": "^2.0.0",
"@ohos/svg": "^2.0.0",
"@ohos/gpu_transform": "^1.0.0"
},
"tags": [
"ImageCache",

11
oh-package.json5 Normal file
View File

@ -0,0 +1,11 @@
{
"license": "ISC",
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"name": "imageknife",
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {}
}

View File

@ -1,19 +0,0 @@
{
"license": "ISC",
"devDependencies": {},
"name": "imageknife",
"ohos": {
"org": "huawei",
"directoryLevel": "project",
"buildTool": "hvigor"
},
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {
"@ohos/hypium": "1.0.3",
"@ohos/hvigor-ohos-plugin": "1.4.0",
"hypium": "^1.0.0",
"@ohos/hvigor": "1.4.0"
}
}