It is currently November 29th, 2022, 10:37 am

[Feature suggestion] Get image from memory? New FileView option?

Report bugs with the Rainmeter application and suggest features.
User avatar
Cariboudjan
Posts: 247
Joined: May 12th, 2019, 8:55 am

[Feature suggestion] Get image from memory? New FileView option?

Post by Cariboudjan »

I would appreciate a feature to allow Image Meters to accept images from memory that aren't pre-written to the hard drive as .ico or .png images. For example, being able to set an .EXE, .LNK, or .URL file path as the ImageName parameter, and have its icon used as the image.

It would be particularly useful in FileView, as it would mean that .ico files would no longer need to be written to the skin's folder - Which currently causes a noticeable lag while waiting for the write to complete, especially while scrolling up/down a list.

Screenshot 2022-03-24 065421.png

Brian, if you're out there - Alternatively, an option within FileView to save the .ico file as the name of the file/shortcut, that can be re-used rather than overwriting itself each time the icon is accessed.

eg.

Instead of saving files as

Code: Select all

Icon1.ico
Icon2.ico
Icon3.ico
The output would be

Code: Select all

Adobe Photoshop 2016.lnk.ico
New text document.txt.ico
My expense report.xlsx.ico
Then FileView checks if a matching icon name exists to the file/folder name, and if so, uses that as its output, rather than processing the icon. Icons would then only need to be processed the first time that file/folder name occurs, or if that file/folder is renamed. And to do a hard-reset on the icon images to force them all to be processed again, you'd just have to run [del /f "#CURRENTPATH#*.ico"]

If you're not up for this, I would love to take a stab at the code and see if I can accomplish this.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Feature suggestion] Get image from memory? New FileView option?

Post by Yincognito »

I like your first suggestion as well, though I'm not sure if and how that can be achieved. Also, in a way, and in certain situations like using hardcoded file names, Rainmeter already uses images from the memory, since it caches them.

Regarding storing the FileView icons, I suppose their names are this way so they can be easily used by the index system in the plugin, or because of the index. Naming them the way you suggested would be useful indeed, but I'm not sure how it will sit with the index part.
User avatar
Cariboudjan
Posts: 247
Joined: May 12th, 2019, 8:55 am

Re: [Feature suggestion] Get image from memory? New FileView option?

Post by Cariboudjan »

Yincognito wrote: March 24th, 2022, 7:30 pm I like your first suggestion as well, though I'm not sure if and how that can be achieved. Also, in a way, and in certain situations like using hardcoded file names, Rainmeter already uses images from the memory, since it caches them.

Regarding storing the FileView icons, I suppose their names are this way so they can be easily used by the index system in the plugin, or because of the index. Naming them the way you suggested would be useful indeed, but I'm not sure how it will sit with the index part.
It wouldn't affect the index. The numbering of the icons is separate from the indexing. It would still know which icon goes in which position. The numbering of the icons isn't important, really, unless you're using...

Code: Select all

[1]
Meter=Image
ImageName=#CURRENTPATH##CURRENTSECTION#.png

[2]
Meter=Image
ImageName=#CURRENTPATH##CURRENTSECTION#.png

[3]
Meter=Image
ImageName=#CURRENTPATH##CURRENTSECTION#.png
What actually matters is the path/filename, which the IconMeasure for FileView retrieves/stores. What you should be using in FileView under ImageName is the IconMeasure's value, not a pre-defined path\filename.
Last edited by balala on March 27th, 2022, 7:22 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.