aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/README.md b/README.md
index fe59851..74ec57b 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,11 @@ Please note that Generative AI was used for making this project
In GNOME >=51, it is now required to use only svg based cursor as xcursor got deprecated
now, I didn't want to give up on my xcursor themes, which were drawn by artists and not
-something rasterized, what this script does is it takes each pixel of the original cursor
-and draws a svg pixel-by-pixel, I think desktop environment like GNOME and KDE cache the
-svg into bitmap, so having a thousand rectangles in a few hundred frame wont cause any
-performance issue. (atleast I hope so, idk I didn't check this).
+something rasterized, what this script does is it takes the bitmap of each cursor frame,
+resizes it with nearest-neighbor sampling, and embeds it in an svg as a base64 data URI.
+This keeps the original pixel art intact while producing the svg cursors that newer
+desktops expect. If you prefer the old approach, `--pixel` draws every visible pixel as
+an SVG rectangle instead.
I tested this on [Hatsune Miku cursor theme by
supermariofps](https://github.com/supermariofps/hatsune-miku-windows-linux-cursors) and a
@@ -15,8 +16,8 @@ few other legacy xcursor themes. It worked pretty well for me on GNOME 51. Pleas
Pull request or submit an issue if something goes wrong. Thank you ^^
> [!IMPORTANT]
-> This project requires `xcur2png` and `imagemagick` which you can find in your standard distro
-> repos.
+> This project requires `xcur2png`, `imagemagick`, and `base64` (part of coreutils), which
+> you can find in your standard distro repos.
## Usage :
@@ -24,16 +25,20 @@ Pull request or submit an issue if something goes wrong. Thank you ^^
./xcursor2svg.sh --res 64 ~/.icons/miku-cursor-linux # install from a old xcursor theme
./xcursor2svg.sh --res 64 -y /path/to/theme # Convert and install automatically
./xcursor2svg.sh --res 64 -n /path/to/theme # Convert only
+./xcursor2svg.sh --res 64 --pixel /path/to/theme # Draw rectangles instead of embedding the bitmap
# For a theme already installed in a standard icon directory:
./xcursor2svg.sh --res 64 miku-cursor-linux
```
`--res` sets the nominal cursor size (default: 32). For each cursor, the closest
available Xcursor size is selected, preferring the larger size in a tie. All
-frames at that size are resized with nearest-neighbor sampling. Visible pixels
-become SVG rectangles with their original colors and transparency. A source at
-the requested size keeps its pixels exactly; resizing replicates or drops pixels,
-without smoothing. These SVGs retain the bitmap appearance when scaled.
+frames at that size are resized with nearest-neighbor sampling and embedded in
+the SVG as a base64 PNG. A source at the requested size keeps its pixels exactly;
+resizing replicates or drops pixels, without smoothing.
+
+Pass `--pixel` to use the older output format, where every visible pixel becomes
+an SVG rectangle with its original color and transparency. That produces larger,
+more verbose files but requires no embedded image data.
Animation order, delays, hotspots, and aliases are preserved in
`cursors_scalable/`, with missing GNOME/CSS names filled from legacy equivalents.