-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-resolution cursors on Windows #149
Comments
I have a sample
|
@stanio Thank you for reporting this. I will look into it soon. |
A side note: Given the original bitmaps map to "Extra-Large" (fully occupying the canvas), I'm producing the "Large" and "Regular" variants by expanding the original canvas (filling with space to the right and bottom) with ¼ and ½ from the original size respectively. Then I'm scaling to the same target resolutions: I'm pointing this out as it could be achieved by manipulating the source SVG
Updating the |
Here's a PoC I've come up with: wincur.zip (Java 11+, source included in the package)
Sample usage Using the rendered source bitmaps (256×256), create Extra-Large, Large, and Regular variants each including five resolutions (32×32, 48×48, 64×64, 96×96, 128×128) of a static cursor:
Creating an animated cursor is a two-step operation:
|
Whomever it may benefit:
Noteworthy
See my main changes: v2.0.4...stanio:Bibata_Cursor:v2.0.4-stanio-3 |
Current, supposedly working, draft snapshot. - ful1e5/Bibata_Cursor#149
@stanio Launched Bibata, a web app at https://bibata.live/ for personalizing cursor color and size in browsers. Thanks for your patience and support. Closing this issue. |
Trying out bibata.live I find virtually nothing has changed related to the original issue:
In this regard, I find the following statement on Windows cursors support currently on the bibata.live site largely misleading:
Bibata packages currently provide very basic (standard-resolution) Windows support. |
[For archival purposes] Here's a streamlined approach to produce all necessary bitmaps. The following table lists all bitmap sizes to be rendered (or downsampled from a single master bitmap):
The leftmost column specifies the final bitmap sizes included in a cursor. Each of these is produced by expanding the corresponding rendered (scaled) bitmap size, filling in with space (no resampling) to the bottom right of the target canvas, as necessary. The relative factors ²⁄₃ (Regular) and ⁴⁄₅ (Large) are derived from my #149 (comment) approach which is the other way around: expand the master canvas (with space) by ¹⁄₂ (Regular) or ¹⁄₄ (Large), then scale to the target size. At the end, multi-resolution cursors should be compiled. |
In case others stumble upon this issue, here are Windows packages I've compiled for my use: stanio/Bibata_Cursor. |
…ndows Cursor Related to ful1e5/Bibata_Cursor#149
Here is a single cursor sample (Unavailable / circle) – three files:
Each of the three contains the same resolutions (canvas sizes): 32x32, 48x48, 64x64, 96x96, 128x128. However Regular 32x32, Large 32x32, and Extra-Large 32x32 are different bitmaps. As given in a table previously (#149 (comment)) – the actual used size on a 32x32 Regular canvas is ~22x22, for Large it is ~26x26, while Extra-Large occupies the full canvas. See how it looks in an editor:
|
@stanio Thanks for your help with the issue. My main challenge now is incorporating multi-dimensional animated cursor frames into a single file. I discovered bugs in the clickgen code and realized additional features are needed to package Windows cursors based on your suggestions. I plan to look into this further when time allows. Meanwhile, I'm reverting the previous patch that removed rendering inside the 32 canvas (ful1e5/clickgen@aa9ea8a) Regarding |
Fair enough.
I wouldn't be able to help with a source contribution as I don't have Python experience, but given you already have basic I have saved the following general documentation references in my Java implementation:
but again – you should have that implemented already. If you have implemented multiple resolutions in the static |
I see v2.0.7 already includes multi-resolution cursors – looks promising! Here are a couple of observations from me:
|
This is likely my editor software trying to make sense of something broken in the file format. An ANI file has a fixed number of frames. The individual frames (CUR) may unconventionally contain a varying number of resolutions, but that's likely to confuse any software trying to interpret the animation. |
From "Bibata-Modern-Ice-Windows-v2.0.7.zip", I have extracted the individual frames (looking up and saving
Each entry of the same resolution appears to be a slightly larger canvas-size version of the previous one. As noted before, the "Extra-Large" frames appear to have just a (single) 96×96 resolution. |
As far as I've observed, the effect is Windows picks the last entry of the same resolution which happens to be the largest canvas painting, and animated cursors from all of the "Regular", "Large", and "Extra-Large" variants are displayed just as "Extra-Large". |
(Follow-up to #116 and #119.)
To adapt for hi-dpi (different resolution) screens the standard Windows cursors provide multiple resolutions for each cursor: 32×32, 48×48, 64×64, 96×96, and 128×128, packaged inside the individual cursor files.
The difference between the "Regular", "Large", and "Extra-Large" schemes is the relative amount of space the cursor shape occupies on the canvas, regardless of the resolution:
(The thin red rulers in the middle and the X spots are not part of the cursor images.)
Likely to conserve memory space the standard animated cursors provide just 32×32, 48×48, and 64×64 resolutions:
Compared with the current Bibata packages – they provide just a single resolution (per scheme):
One may notice the "Large" and "Extra-Large" schemes provide different resolutions for what is essentially a single scheme (I deem): "Extra-Large". "Small" and "Regular" map more closely to "Regular" and "Large".
Ultimately this causes dynamic upscale resampling and blurry cursors on hi-dpi screens. The individual Bibata cursors for Windows should provide multiple resolutions as with the standard Windows cursors.
I guess this is dependent on clickgen supporting it, also.
The text was updated successfully, but these errors were encountered: