How do you save an HTML5 as an ICO image (icon file) or a .cur file (static mouse cursor) rather than a PNG in JavaScript?

I’ve been searching for how to save an HTML5 <canvas> element as a .ico image or a .cur file (static mouse cursor file) on Google, but I’m getting results for how to save as a PNG, not another format. What do I do in JavaScript to save a <canvas> as an image in any format other than PNG? (e.g. JPEG, BMP, GIF, ICO)


There’s an example at MDN – A way to convert a canvas to an ico which might help you. It says Mozilla only, but suggests that other browsers might be made to work.