It is currently March 28th, 2024, 8:03 am

Looking for a non-stretching picture frame

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

Looking for a non-stretching picture frame

Post by Traxan »

Good day. I use a 16:9 slide show picture frame, which is great for wallpapers but not so good for photos. The result is square or skinny pictures are stretched to fit the frame. I was hoping for a recommendation of a slide show picture frame that does not stretch the image but merely presents it in its regular ratio.

And yes, I did look at the ini and could find no settings for stretch to fit. Perhaps I don't know how to read code, that is likely, but the code was pretty basic and there was nothing there about stretch to fit.

Thanks.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
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 »

Traxan wrote: August 23rd, 2019, 6:43 pm Good day. I use a 16:9 slide show picture frame, which is great for wallpapers but not so good for photos. The result is square or skinny pictures are stretched to fit the frame. I was hoping for a recommendation of a slide show picture frame that does not stretch the image but merely presents it in its regular ratio.

And yes, I did look at the ini and could find no settings for stretch to fit. Perhaps I don't know how to read code, that is likely, but the code was pretty basic and there was nothing there about stretch to fit.

Thanks.
Without seeing any code or a link to the skin you are using, it is difficult to offer any help...

I would highly recommend moshiAB's Sphynx Daily Photo which offers pictures from 20+ sites with several beautiful frame options. His code will be difficult to duplicate, but perhaps you will find some inspiration.
Traxan
Posts: 20
Joined: June 13th, 2014, 5:18 pm

Re: Looking for a non-stretching picture frame

Post by Traxan »

eclectic-tech wrote: August 23rd, 2019, 7:07 pm Without seeing any code or a link to the skin you are using, it is difficult to offer any help...
Ok here it is.

Code: Select all

[Rainmeter]
Author=r3ginald
Update=10000


;Metadata added by RainBrowser
;http://rainmeter.net/RainCMS/?q=Rainmeter101_AnatomyOfASkin

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
FontName=Century Gothic
fontColor.Text=255, 255, 255, 160
bar.color=255, 255, 255, 50
graph.line1=255, 255, 255, 75
graph.line2=255, 255, 255, 37
border.color=255, 255, 255, 75
ImagePath=d:\pix\
Define Subfolders (1 = Yes, 0 = NO)
SubFolders=0
FileFilter=*.jpg;*.jpeg;*.png;*.bmp

;-----------------

[Ring]
Measure=Calc
Formula=360

[Filter]
Meter=IMAGE
SolidColor=0,0,0,0
X=0
Y=0
H=269
W=400

;START:FRAME
;===========================================
[cara1]
Meter=IMAGE
X=2
Y=0
W=402
H=2
SolidColor=#border.color#

[cara1_2]
Meter=IMAGE
X=0
Y=0
W=2
H=271
SolidColor=#border.color#

[cara2]
Meter=IMAGE
X=0
Y=271
W=402
H=2
SolidColor=#border.color#

[cara2_2]
Meter=IMAGE
X=402
Y=2
W=2
H=271
SolidColor=#border.color#
; END:FRAME
;=======================================


;-------------------
    User Picture
;-------------------

[Picture]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#ImagePath#
FileFilter=#FileFilter#
Subfolders=#SubFolders#

;-------------------

[Slideshow]
MeasureName=Picture
Meter=IMAGE
X=2
Y=2
W=400
H=269
Hidden=0
LeftMouseupAction=!Execute ["#ImagePath#"]
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Looking for a non-stretching picture frame

Post by mak_kawa »

You may add PreserveAspectRatio=1 to the Slideshow meter.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
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: August 23rd, 2019, 8:28 pm You may add PreserveAspectRatio=1 to the Slideshow meter.
Yes, that will preserve the ratio so all images fit into the defined frame size.

The problem with this skin and doing that is there is an invisible [Filter] section, so smaller images will have the desktop showing around them.

There is lots of "stuff" in that code that is not being used. I removed all the items that were not being used. Replaced the [Filter] and 4 [Frame] sections with a single SHAPE meter. Added "UpdateDivider=10" to the Quote measure so it updates once every 10 seconds. Then added PreserveAspectRatio=1 to the [Slideshow] meter. Now smaller images will have a black background instead of showing the desktop.

Code: Select all

[Variables]
ImagePath=d:\pix\
;Define Subfolders (1 = Yes, 0 = NO)
SubFolders=0
FileFilter=*.jpg;*.jpeg;*.png;*.bmp

[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
; Documentation: https://docs.rainmeter.net/manual-beta/meters/shape/#Rectangle

;-------------------
    User Picture
;-------------------

[Picture]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#ImagePath#
FileFilter=#FileFilter#
Subfolders=#SubFolders#
UpdateDivider=10

;-------------------

[Slideshow]
MeasureName=Picture
Meter=IMAGE
X=2
Y=2
W=400
H=269
Hidden=0
LeftMouseupAction=["#ImagePath#"]
PreserveAspectRatio=1
frame.gif
Traxan
Posts: 20
Joined: June 13th, 2014, 5:18 pm

Re: Looking for a non-stretching picture frame

Post by Traxan »

Oh that's perfect, thank you Mak and Eclectic.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
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 »

You are welcome, happy to help. :great:
Traxan
Posts: 20
Joined: June 13th, 2014, 5:18 pm

Re: Looking for a non-stretching picture frame

Post by Traxan »

You were right about the code being really old. It comes from a collection called Clean Red that I've had since 2012.
Traxan
Posts: 20
Joined: June 13th, 2014, 5:18 pm

Re: Looking for a non-stretching picture frame

Post by Traxan »

Bumping due to a strange issue. I use a folder with 670 images in it but the slide show appears to be skipping a LOT of the jpgs. Is there any reason why it would do so? I can view the images just fine but the slide show is omitting a large number of them.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Looking for a non-stretching picture frame

Post by mak_kawa »

I have no idea because your (and ecletic-tech's) code seems to work well.

Can you provide us the fullpath names of "one of the skipped pictures" and "one of the non-skipped pictures"?

And... what does happen when you change a line SubFolders=0 in variables section to SubFolders=1 ?
Post Reply