https://github.com/felladrin/windows-cursor-icon
Use Node.js to extract the image from Windows OS cursor: https://npm.im/windows-cursor-icon
https://github.com/felladrin/windows-cursor-icon
npm-package
Last synced: 7 months ago
JSON representation
Use Node.js to extract the image from Windows OS cursor: https://npm.im/windows-cursor-icon
- Host: GitHub
- URL: https://github.com/felladrin/windows-cursor-icon
- Owner: felladrin
- License: mit
- Created: 2021-03-14T20:50:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-23T08:40:12.000Z (over 2 years ago)
- Last Synced: 2025-03-19T02:45:08.235Z (7 months ago)
- Topics: npm-package
- Language: TypeScript
- Homepage: https://npm.im/windows-cursor-icon
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Windows Cursor Icon
Get the Windows cursor icon in different image formats.
## Install
```
npm i windows-cursor-icon
```## Usage
```js
const { getCursorIcon, ImageFormat } = require("windows-cursor-icon");const cursorIcon = getCursorIcon({ imageFormat: ImageFormat.Png });
console.log(cursorIcon);
// Prints:
// {
// hasChanged: true,
// isHidden: false,
// id: 65541,
// buffer: ,
// imageFormat: 'Png',
// xHotspot: 8,
// yHotspot: 9
// }// The icon is in buffer, so it can be saved to a file, for example:
require("fs").writeFileSync("cursorIcon.png", cursorIcon.buffer);
```Check [more examples here](./examples)!