It is currently March 29th, 2024, 2:34 am

Download an image with WebParser

Get help with creating, editing & fixing problems with skins
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Download an image with WebParser

Post by fonpaolo »

Well, the main problem is that the link to that image isn't in the page layout.
As I said, with modern browsers, look in the source code of the web page is very simple, but if what you're trying to download is in the page, when it's an external resource, you can try to find the address of that image and hope it's accessible via WebParser...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Download an image with WebParser

Post by balala »

fonpaolo wrote:you can try to find the address of that image
How?
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Download an image with WebParser

Post by fonpaolo »

balala wrote:How?
Ugh! :17flag
...I doubt you can access something, there's no images and references, I suspect they're created with javascript, so, it's a dead end.
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Download an image with WebParser

Post by FreeRaider »

fonpaolo wrote:Well, this is the "name" of your image:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATYAAAAcCAYAAADr/JNNAAAJQklEQVR4Xu1cbUxU2Rl+D4wElYVopWI2ZoS6Soy1P7Z1GzEo2aIlzbb90ZZtB2ZCAQXiUEHIACPMDBJgtqIUm0WBKTAyAZv9s3ZXdo2QjB8YNzWtAb9Wf5QmyywUYUWhuoqnObMMHZh7Rw6ce++Me25iIjfvPee9z/u8z33OuTODgB8cAY4AR+AVQwD5u5/e3t4vrVbr2sbGxoa4uLg/jI+P15WUlBRu3779QWZm5ho5scAY77VYLB+FhISoKioqUFlZ2VfV1dVRnhxaWlpGs7KyouXIaXR09PChQ4cM7e3tEbt27Zpsbm4+RubNzc019PT0hBkMhtHa2to0hNCncuTjPcf58+fv7dmzZyM5p9PpHjc0NHwcFRX1rtx5kPk4f4RRD2T+XLp0qTM3N/dXAwMDqu7u7v6UlJRtSnBnfr8LYbZp06YKsd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nGWFvHKCtvJ/T/1QUb1/D48V7l/XHPOQc5Ph95TYEVhBox8VzIknyzbfSaOnxYHIXz8UOz3kzHdf1n55dx9ciXx5MIm8tUpVoLNhW1RistMaAPNMdDyihV/2OBAW0tWKy5244jgyR0bLTFDp4U+5zdWPL7hwR9X/euNeUwh+5WrBdgzBlk2371MWpr5iWcmJLQ5tWT6OicAWnzEZh2D6dAHijgwWp6IxQvzB4rHN9yj4g8bHGiry06QWOHJhU1iJ0dbKMov39MyUDFhk9ZJBF5j0dZdqZdhdPMqt4dNiycXNi5stOK4qHgubP73aOkERmohpy2x1PnQj8+FLcCEjfbJRNcQ4k9ciZ3ivG+yePKgJWzwOAZp60iLG208FzbR3zNjU1hWBaEdJ9jj6YnJhW0xjkpqnigl5PT8UabfqX9Pkb88CLRC0eVDT0wubFzYaFnz/3ipBZ5+fL4U5UtRt+vmwsaFjQvbLAL0SkrnPGjHV8q60+YpdTwtRbmwfYOY1HWhHV8pPtPzR9q+psVNlM//A8lha5VmFuwBAAAAAElFTkSuQmCC
:17what
That is not the image "name", that "IS" the image: Data URI scheme
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Download an image with WebParser

Post by balala »

fonpaolo wrote:I suspect they're created with javascript, so, it's a dead end.
If so, it's indeed.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Download an image with WebParser

Post by fonpaolo »

FreeRaider wrote:That is not the image "name", that "IS" the image: Data URI scheme
Uhm... yes, I didn't look closely enough.
I suspected it, graphics are always drawn, as they change regularly.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Download an image with WebParser

Post by jsmorley »

It's not that that image is "drawn" by that Base64 code, it's still a static raster image, but it is decoded into a binary image in and by your web browser, and then rendered like any other image.

Rainmeter can't use Base64 encoded binary code that defines an image in HTML/CSS. You would need to parse out that code, and pass it through some 3rd-party utility that can decode it to an image file. Then load that file in an Image meter.

Using base64 encoding is a way to encode binary data, like images, into plain-text HTML on a web site. The advantage it has is that as long as the image(s) are small, there is a relatively large savings in performance by just downloading the code and having the browser decode and render it, rather than having an actual image file that is downloaded as a file, loaded from your disk cache, decoded and rendered. It's mostly used for small images like navigation buttons or social media images, but you probably won't run into it all that often other than that, as images over 5K or so take so much text / HTML to encode, that you get on the wrong side of the curve on any savings over just downloading the binary image file.

In any case, neither WebParser or Rainmeter in general is a web browser.
User avatar
tjhrulz
Developer
Posts: 267
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Download an image with WebParser

Post by tjhrulz »

jsmorley wrote:It's not that that image is "drawn" by that Base64 code, it's still a static raster image, but it is decoded into a binary image in and by your web browser, and then rendered like any other image.

Rainmeter can't use Base64 encoded binary code that defines an image in HTML/CSS. You would need to parse out that code, and pass it through some 3rd-party utility that can decode it to an image file. Then load that file in an Image meter.

Using base64 encoding is a way to encode binary data, like images, into plain-text HTML on a web site. The advantage it has is that as long as the image(s) are small, there is a relatively large savings in performance by just downloading the code and having the browser decode and render it, rather than having an actual image file that is downloaded as a file, loaded from your disk cache, decoded and rendered. It's mostly used for small images like navigation buttons or social media images, but you probably won't run into it all that often other than that, as images over 5K or so take so much text / HTML to encode, that you get on the wrong side of the curve on any savings over just downloading the binary image file.

In any case, neither WebParser or Rainmeter in general is a web browser.
It is possible to build a plugin to decode it as well, I have used that in the past to decode images for Rainmeter.