1
0

update README.md

Signed-off-by: Y7000p <xcl@xuegao-tzx.top>
This commit is contained in:
田梓萱 2022-05-16 19:37:27 +08:00
parent 9d2076b0be
commit f1c53cd018
3 changed files with 22 additions and 22 deletions

View File

@ -13,12 +13,10 @@ f
settings.gradle,0\5\05efc8b1657769a27696d478ded1e95f38737233 settings.gradle,0\5\05efc8b1657769a27696d478ded1e95f38737233
< <
build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35 build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35
:
.gitignore,a\5\a5cc2925ca8258af241be7e5b0381edf30266302
A A
gradle.properties,2\a\2afbb999f001938c88fa43fc2ef52abf0f8213e4 gradle.properties,2\a\2afbb999f001938c88fa43fc2ef52abf0f8213e4
9 9
README.md,8\e\8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d README.md,8\e\8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d
=
upload.gradle,9\2\92bb4b9034d01b5517aed00be842828de7184f6e
:
.gitignore,a\5\a5cc2925ca8258af241be7e5b0381edf30266302

View File

@ -5,12 +5,14 @@ ImageTracerJava(一个可以把png等图片转svg的开源Java库)
## How to Use: ## How to Use:
### Including in Java projects ### Including in Java projects
Add **ImageTracer.jar** to your build path
**ImageTracer.jar** 添加到构建路径 Add **ImageTracer.jar** to your build path<br>
**ImageTracer.jar** 添加到构建路径<br>
### 安装教程 ### 安装教程
**Add the mavenCentral repository under the project's build.gradle** **Add the mavenCentral repository under the project's build.gradle**<br>
**在 Project 的 build.gradle 下添加 mavenCentral 仓库** **在 Project 的 build.gradle 下添加 mavenCentral 仓库**<br>
```groovy ```groovy
repositories { repositories {
@ -24,15 +26,15 @@ repositories {
} }
``` ```
**Add ImageTracerJava dependency under Module's build.gradle** **Add ImageTracerJava dependency under Module's build.gradle**<br>
**在 Module 的 build.gradle 下添加 ImageTracerJava 依赖** **在 Module 的 build.gradle 下添加 ImageTracerJava 依赖**<br>
```groovy ```groovy
implementation 'top.xuegao-tzx:ImageTracerJava:1.1.4.516' implementation 'top.xuegao-tzx:ImageTracerJava:1.1.4.516'
``` ```
then use the static methods: then use the static methods:<br>
然后使用静态方法: 然后使用静态方法:<br>
```java ```java
import com.xcl.imagetracer_mod.ImageTracer; import com.xcl.imagetracer_mod.ImageTracer;
@ -44,8 +46,8 @@ ImageTracer.saveString(
); );
``` ```
With options and palette With options and palette<br>
带有选项和调色板的方法: 带有选项和调色板的方法:<br>
```java ```java
// Options // Options
@ -96,8 +98,8 @@ ImageTracer.saveString(
See [options for deterministic tracing](https://github.com/jankovicsandras/imagetracerjava/blob/master/deterministic.md) See [options for deterministic tracing](https://github.com/jankovicsandras/imagetracerjava/blob/master/deterministic.md)
### Main Functions ### Main Functions<br>
### 主要功能 ### 主要功能<br>
|Function name|Arguments|Returns| |Function name|Arguments|Returns|
|-------------|---------|-------| |-------------|---------|-------|
|```imageToSVG```|```String filename, HashMap<String,Float> options /*can be null*/, byte [][] palette /*can be null*/```|```String /*SVG content*/```| |```imageToSVG```|```String filename, HashMap<String,Float> options /*can be null*/, byte [][] palette /*can be null*/```|```String /*SVG content*/```|
@ -119,8 +121,8 @@ See [options for deterministic tracing](https://github.com/jankovicsandras/image
There are more functions for advanced users, read the source if you are interested. :) There are more functions for advanced users, read the source if you are interested. :)
### Options ### Options<br>
### 配置选项 ### 配置选项<br>
|Option name|Default value|Meaning| |Option name|Default value|Meaning|
|-----------|-------------|-------| |-----------|-------------|-------|
|```ltres```|```1f```|Error treshold for straight lines.| |```ltres```|```1f```|Error treshold for straight lines.|
@ -142,7 +144,7 @@ There are more functions for advanced users, read the source if you are interest
### Process overview ### Process overview
See [Process overview and Ideas for improvement](https://github.com/jankovicsandras/imagetracerjava/blob/master/process_overview.md) See [Process overview and Ideas for improvement](https://github.com/jankovicsandras/imagetracerjava/blob/master/process_overview.md)
### License ### License<br>
### 许可证 ### 许可证<br>
Modfiy Author田梓萱<br> Modfiy Author田梓萱<br>
ImageTracerJava 在 [Apache 2.0 License](LICENSE)下获得许可 ImageTracerJava 在 [Apache 2.0 License](LICENSE)下获得许可