ANI2Cape/README.md

40 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Forked ANI2Cape
- 添加了一个完整的[config.py](./config.py)范例
- 添加了对普通静态.cur文件的支持部分.cur是直接用.ico重命名得到的在此特别支持
- 添加了对索引颜色的支持并且针对Pillow对.ico/.cur色板格式处理的问题作出修正
- 添加了在配置文件中直接旋转光标的功能
- HiDPI打开时范例中默认打开将源文件自动视为两倍大小版本导入并同时生成普通大小版本
- 添加了自动计算长宽的功能
a. 长和宽均为-1则直接从原图取得长宽数值
b. 长、宽二者之一为-1则从给定数值的边长计算出缩放倍率并等比缩放
- 通过在四周增加2像素padding解决顶格的动态指针边缘出现黑线的问题
注:
- `ani2cape.py`不接受参数,直接运行即读取同目录下`config.py`内容,其中`Cursors`子项目`Path`属性使用相对路径时基于当前切换到的目录(而不是程序目录)
- 建议先创建并启用venv后`pip install -e .`安装,编辑`config.py`内容后,再切换到包含指针的目录直接运行`ani2cape`命令
# ANI2Cape
A tool that can convert Windows Animated Cursors (*.ani) to GIF/Pillow Images/Cape format
一个可以将ANI格式文件转化为GIF格式、抽帧转为Pillow Images格式转为Linux/MacOS可用的指针格式的工具~
- [x] ANI2Pillow Image
- [x] ANI2GIF(ANI2Pillow Image + Pillow Image2GIF)
- [x] ANI2SpriteSheet(ANI2Pillow Image + Pillow Image2SpriteSheet)
- [x] GIF2SpriteSheet(GIF2Pillow Image + Pillow Image2SpriteSheet)
- [x] ANI2Cape
# Usage
`Usage:python XXX.py <inputFile> <outputFile,Option>`
inputFile:需要转化的文件路径。
outputFile输出的文件路径。默认为<输入文件名>.xxx
# Document
[从Windows动态指针到MacOS动态指针——ANI2GIF](https://www.bilibili.com/read/cv20591812)
[从Windows动态指针到MacOS动态指针—— 在MacOS上制作指针](https://www.bilibili.com/read/cv20611896)
[从Windows动态指针到MacOS动态指针—— 在Windows上制作指针](https://www.bilibili.com/read/cv20634842)