It is currently March 28th, 2024, 3:58 pm

Looking for a non-stretching picture frame

General topics related to Rainmeter.
Traxan
Posts: 20
Joined: June 13th, 2014, 5:18 pm

Re: Looking for a non-stretching picture frame

Post by Traxan »

There are no subfolders.

It's an odd one. I have a folder of 700+ images but there are certain ones that are shown over and over. But since I am not always watching it's hard to say which ones are not showing up.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Looking for a non-stretching picture frame

Post by mak_kawa »

I don't know the reason and workaround for your situation, but... Just a suggestion. How about using FileView plugin instead of Quote plugin? For example;

Code: Select all

[Variables]
ImagePath=d:\pix\
SubFolders=0
FileFilter=jpg;jpeg;png;bmp
ChangeInterval=10

[MeterShapeRectangle]
Meter=Shape
X=1
Y=1
Shape=Rectangle 0,0,402,271 | Fill Color 0,0,0 | StrokeWidth 2 | StrokeColor 255,255,255,75

[MeasureFolder]
Measure=Plugin
Plugin=FileView
Path=#ImagePath#
Recursive=#SubFolders#
Extensions=#FileFilter#
FinishAction=[!EnableMeasure MeasureRandom][!EnableMeasure MeasureImagePath]

[MeasureCount]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FileCount

[MeasureRandom]
Measure=Calc
Formula=Random
UniqueRandom=1
LowBound=1
HighBound=[MeasureCount]
DynamicVariables=1
UpdateDivider=#ChangeInterval#
Disabled=1

[MeasureImagePath]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FilePath
IgnoreCount=1
Index=[MeasureRandom]
DynamicVariables=1
UpdateDivider=#ChangeInterval#
Disabled=1

[Slideshow]
MeasureName=MeasureImagePath
Meter=IMAGE
X=2
Y=2
W=400
H=269
Hidden=0
LeftMouseupAction=["#ImagePath#"]
PreserveAspectRatio=1
PS.: Logic to get random file path is originally by FreeRaider, thanks.
shoek
Posts: 32
Joined: March 10th, 2017, 1:47 am

Re: Looking for a non-stretching picture frame

Post by shoek »

mak_kawa wrote: September 4th, 2019, 3:15 am I don't know the reason and workaround for your situation, but... Just a suggestion. How about using FileView plugin instead of Quote plugin? For example;
Thanks for this... however, MeasureImagePath is never populated for me. I have about 25000 images in the folder+subfolders that I am pointing to. I see MeasureRandom changing every interval, but it is not actually deriving a filename to display.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Looking for a non-stretching picture frame

Post by eclectic-tech »

shoek wrote: September 5th, 2019, 1:00 pm Thanks for this... however, MeasureImagePath is never populated for me. I have about 25000 images in the folder+subfolders that I am pointing to. I see MeasureRandom changing every interval, but it is not actually deriving a filename to display.
What value did you set as the "ImagePath"?
Set "SubFolders=1" to search those folders.

Code: Select all

[Variables]
ImagePath=d:\pix\
SubFolders=0
shoek
Posts: 32
Joined: March 10th, 2017, 1:47 am

Re: Looking for a non-stretching picture frame

Post by shoek »

eclectic-tech wrote: September 5th, 2019, 1:21 pm What value did you set as the "ImagePath"?
Set "SubFolders=1" to search those folders.

Code: Select all

[Variables]
ImagePath=d:\pix\
SubFolders=0
Yes, I set imagePath to P:\Photos\ (a mapped drive from my NAS) and enabled subfolder search.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Looking for a non-stretching picture frame

Post by eclectic-tech »

shoek wrote: September 5th, 2019, 4:02 pm Yes, I set imagePath to P:\Photos\ (a mapped drive from my NAS) and enabled subfolder search.
Not sure why it is not working for you.
It may be because it is a mapped drive; I will try to test FileView a bit later to see if it has any issues reading those types (it shouldn't).

You could try adding an update divider and an update command to re-read the disk when the main measure is updated; be aware this can be very CPU intensive, so use a fairly large update divider value. This will cause the measure to read the disc every 60th update for changes; if for some reason your mapped drive is not available when the skin is loaded, this may get it working.

Code: Select all

[MeasureFolder]
...
UpdateDivider=60
OnUpdateAction=[!CommandMeasure MeasureFolder Update]
The code works fine for my wallpaper folder on my physical drive...
shoek
Posts: 32
Joined: March 10th, 2017, 1:47 am

Re: Looking for a non-stretching picture frame

Post by shoek »

eclectic-tech wrote: September 5th, 2019, 4:18 pm Not sure why it is not working for you.
It may be because it is a mapped drive; I will try to test FileView a bit later to see if it has any issues reading those types (it shouldn't).

You could try adding an update divider and an update command to re-read the disk when the main measure is updated; be aware this can be very CPU intensive, so use a fairly large update divider value. This will cause the measure to read the disc every 60th update for changes; if for some reason your mapped drive is not available when the skin is loaded, this may get it working.

Code: Select all

[MeasureFolder]
...
UpdateDivider=60
OnUpdateAction=[!CommandMeasure MeasureFolder Update]
The code works fine for my wallpaper folder on my physical drive...
thanks... I did try with a local folder with about 20000 images in it (in various subfolders) and it also never updates the MeasureImagePath
Image

I assume the FileView plugin returns an array of size MeasureCount with each element being a full path to an image, and then the random number is used to index into that array to get the path... and this is what doesn't seem to work. Can I dump to the log the array somehow?
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Looking for a non-stretching picture frame

Post by mak_kawa »

To get file path including subfolders by FileView plugin, we have to set Recursive= option to 2. So SubFolders variable must be set to "2"
shoek
Posts: 32
Joined: March 10th, 2017, 1:47 am

Re: Looking for a non-stretching picture frame

Post by shoek »

mak_kawa wrote: September 5th, 2019, 8:46 pm To get file path including subfolders by FileView plugin, we have to set Recursive= option to 2. So SubFolders variable must be set to "2"
Doh! It always comes down to something simple.... thank you! Working fine now...
FileView is so much faster enumerating my 50,000 images than QuotePlugin was :)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Looking for a non-stretching picture frame

Post by eclectic-tech »

mak_kawa wrote: September 5th, 2019, 8:46 pm To get file path including subfolders by FileView plugin, we have to set Recursive= option to 2. So SubFolders variable must be set to "2"
Good catch mak_kawa! I completely overlooked the Recursive setting :)
Post Reply