I have image data of cursor in in 2d byte array .I want to make custom cursor by this raw data.If anybody know please tell how to make by url() function of javascript?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might be able to use a
dataURI to encapsulate the raw pixels, but even then you need to have some kind of format. Are you using acanvasto create the image? If so, you might be able to use JavaScript to convert it like this:What this does is return the canvas as a data URI, which looks like this:
This can be used in just about all modern browsers directly in a
url()in a stylesheet.If you just want to encode the item in a stylesheet, and you have some sort of source image, you can use a Data URI encoder like this one, which lets you upload an image and returns encoded string.
But if you just have a raw byte string for the image, please see this stackoverflow answer for the conversion, then use the data URI scheme above.