Crates.io | wcursorgen |
lib.rs | wcursorgen |
version | 0.1.1 |
source | src |
created_at | 2020-11-20 12:29:09.692171 |
updated_at | 2020-11-20 15:03:01.722051 |
description | Generating windows cursor file from PNGs and xcursorgen config. |
homepage | |
repository | https://github.com/balthild/wcursorgen |
max_upload_size | |
id | 314331 |
size | 54,679 |
This program reads the config file to find the list of cursor images in PNG format along with their hotspot and nominal size, then converts all the images to CUR or ANI format.
The config file format is the same with xcursorgen. Each line in the config is of the form:
<size> <x-hot> <y-hot> <filename> <ms-delay>
Multiple images with the same <size>
are used to create animated cursors, the <ms-delay>
value on each line indicates how long each image should be displayed before switching to the next. <ms-delay>
can be elided for static cursors.
Note: on Windows, the frame rate of animated cursor is in terms of jiffies (1/60 sec), so the difference of <ms-delay>
will not take effect precisely. For example, both 30 ms
and 40 ms
result in round(30 / 16.667) = round(40 / 16.667) = 2 jiffies
in the generated cursor file.
USAGE:
wcursorgen.exe [OPTIONS] --config <config> --output <output> --size <size>
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-c, --config <config>
The path of config file
-o, --output <output>
The path of output file without file ext (a .cur or .ani ext will be automatically
appended according to whether the cursor is animated)
-p, --prefix <prefix>
Find cursor images in the directory. If not specified, the current directory is used
-s, --size <size>
Choose which size to generate. Unlike X11 cursor, one ANI file cannot contain multiple
images in different sizes, so we must pick up one. The size specified must exist in the
config