It is currently April 27th, 2024, 12:55 am

Downloading a canvas element with WebParser?

Get help with creating, editing & fixing problems with skins
User avatar
Halloyo
Posts: 31
Joined: June 17th, 2020, 3:08 am

Downloading a canvas element with WebParser?

Post by Halloyo »

Hello,

Is it possible for Rainmeter to download canvas elements as images? I know right-clicking and downloading the image works, but would it be compatible with Rainmeter?
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Downloading a canvas element with WebParser?

Post by Mor3bane »

I might be wrong but the parser is not meant to do whole canvas elements, if i surmise this as implied, the whole shebang so to speak is not a parse-able thing only the parts or parse of the canvas will be available to the webparser.

reminder: i could be wrong, but... hmmm...
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Downloading a canvas element with WebParser?

Post by Yincognito »

Halloyo wrote: August 2nd, 2020, 8:50 pm Hello,

Is it possible for Rainmeter to download canvas elements as images? I know right-clicking and downloading the image works, but would it be compatible with Rainmeter?
Not possible, as far as I'm aware of. The canvas element is as far as I know, drawn "on the fly", which means that is not available to be downloaded with Rainmeter as it's not an actual saved image file on some server, but rather a "work in progress" from a technical point of view. That being said, if the downloaded image is stable (i.e. it exists on the server independently of whether the canvas is drawn or not - but somehow I doubt that) and supported by Rainmeter, I don't see why not. The best thing though is to look for an alternative to the whole canvas thing, like a supported bare image that you can statically access through an URL (preferably no Javascript involved).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Downloading a canvas element with WebParser?

Post by balala »

Sorry, maybe this is a little bit stupid question, but what the canvas elements are? Beacuse I can't realize.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Downloading a canvas element with WebParser?

Post by Yincognito »

balala wrote: August 4th, 2020, 6:04 pm Sorry, maybe this is a little bit stupid question, but what the canvas elements are? Beacuse I can't realize.
No question aimed at accumulating knowledge is stupid. The canvas element is basically a HTML element used to hold up drawings created with Javascript. See here for details (you can click on the Try It Yourself buttons on the page to see how the element appears both in the HTML and visually).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Downloading a canvas element with WebParser?

Post by balala »

Yincognito wrote: August 4th, 2020, 8:09 pm No question aimed at accumulating knowledge is stupid. The canvas element is basically a HTML element used to hold up drawings created with Javascript. See here for details (you can click on the Try It Yourself buttons on the page to see how the element appears both in the HTML and visually).
I see now and thanks for the details. Since they are using JavaScripts, I'd tempted to agree with you, that it probably is not possible to download them with WebParser measures.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Downloading a canvas element with WebParser?

Post by Yincognito »

balala wrote: August 4th, 2020, 8:19 pm I see now and thanks for the details. Since they are using JavaScripts, I'd tempted to agree with you, that it probably is not possible to download them with WebParser measures.
Yeah, but it isn't really about Javascript per se. If the drawing was created by Javascript but also saved as an image file on the server at the same time, Rainmeter would have to problem getting the image file and display it. But since the drawings are created "on the fly" by Javascript, that option is unlikely. That's why I recommended an alternate way to get a similar already made image.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Downloading a canvas element with WebParser?

Post by balala »

Yincognito wrote: August 4th, 2020, 8:26 pm Yeah, but it isn't really about Javascript per se. If the drawing was created by Javascript but also saved as an image file on the server at the same time, Rainmeter would have to problem getting the image file and display it. But since the drawings are created "on the fly" by Javascript, that option is unlikely. That's why I recommended an alternate way to get a similar already made image.
:confused: Yep, probably you're right, I'm not sure yet. :confused: