Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdong2016 committed Aug 16, 2020
1 parent a61f442 commit 5ca08d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ PlistDumper 是一个拆图工具。游戏发布的时候通常会采用和图
* 支持fnt位图字体文件导出
* `golang` 开发,跨平台,可运行在Windows、Mac、Linux。

## 使用说明
## 安装
* 首先安装golang环境
* 执行 go get -u -v github.com/qcdong2016/PlistDumper


## 使用说明
```
$ PlistDumper [plist|json|fnt|dir]
```
Expand Down
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func LoadImage(path string) (img image.Image, err error) {
}

func SaveImage(path string, img image.Image) (err error) {

if filepath.Ext(path) == "" {
path = path + ".png"
}

os.MkdirAll(filepath.Dir(path), os.ModePerm)
imgfile, err := os.Create(path)
defer imgfile.Close()
Expand Down

0 comments on commit 5ca08d3

Please sign in to comment.