It is currently August 17th, 2019, 11:45 am

Slide show pic sizes

Help with creating, editing & fixing problems with skins
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Slide show pic sizes

CyborgTJB » July 13th, 2019, 3:38 am

I'm having issues with my Slide shows. I want Pic in controlled size (e.g. w=150, H=225). But There is a problem with it. The wide pics are being showing in same size which looks real funny. I want wide pic as they are but with in controlled size.
Thanks for help in Advance...
You do not have the required permissions to view the files attached to this post.
Last edited by CyborgTJB on July 20th, 2019, 1:01 pm, edited 1 time in total.
CyborG, I love and like to collect and join. :sly:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3476
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Slide show pic sizes

eclectic-tech » July 13th, 2019, 4:51 am

You can use PreserveAspectRatio=2 in your image meters to resize and crop the images into your desired W & H. See Manual Info

Your code uses some deprecated terms you could modernize:
Replace all instances of !Rainmeter... with just !
Example: !RaimeterShowMeter to !ShowMeter

Delete all instances of !Execute (it is no longer needed)
Example: !Execute ["#skinspath#\Paper\Pictures.ini"] to ["#skinspath#\Paper\Pictures.ini"]

You could add UpdateDivider=5 to your QuotePlugin measures and set default Update=1000 in the [Rainmeter] section, or remove that section altogether, to achieve the 5 second update of images.

Optional Modernized Code (with above changes)
Note: I changed the QuotePlugin PathNames to show my pictures

Code: Select all

[Rainmeter]
Update=1000

[PLG1]
Measure=Plugin
Plugin=QuotePlugin
PathName="C:\Users\John\Pictures\Walls\Nature"
; FileFilter=
; Subfolders=
Group=a1
UpdateDivider=5

[PLG2]
Measure=Plugin
Plugin=QuotePlugin
PathName="C:\Users\John\Pictures\Walls\Astronomy"
; FileFilter=
; Subfolders=
Group=a2
Hidden=1
UpdateDivider=5

[Pictures1]
MeasureName=PLG1
Meter=IMAGE
X=0
Y=0
w=150
H=225
PreserveAspectRatio=2
LeftMouseDoubleClickAction=[!HideMeterGroup a1][!ShowMeterGroup a2]
RightMouseDoubleClickAction=["C:\Users\John\Pictures\Walls\Nature"]
Group=a1

[Pictures2]
MeasureName=PLG2
Meter=IMAGE
X=0
Y=0
w=150
H=225
PreserveAspectRatio=2
LeftMouseDoubleClickAction=[!HideMeterGroup a2][!ShowMeterGroup a1]
RightMouseDoubleClickAction=["C:\Users\John\Pictures\Walls\Astronomy"]
Group=a2
Hidden=1

[Edit skin]
meter=button
buttonimage=Button5.png
x=0
y=225
LeftMouseUpAction=["#skinspath#\Paper\Pictures.ini"]
MouseOverAction=[!ShowMeter EditT][!Redraw]
MouseLeaveAction=[!HideMeter EditT][!Redraw]

[EditT]
Meter=string
MeterStyle=Normal
StringAlign=Left
FontFace=#Font2#
FontSize=9
FontColor=#Color2#
X=30
Y=225
Text=Edit skin
Hidden=1
User avatar
balala
Rainmeter Sage
Posts: 8532
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Slide show pic sizes

balala » July 13th, 2019, 6:17 am

A few additional things I'd add to eclectic-tech's post:
  • Although not prohibited, nor a good idea is to use spaces into section names (last paragraph here). I recommend to renounce them. For instance replace the [Edit skin] meter name with [EditSkin] (or any other name with no space).
  • No matter what value is set to the Update into the [Rainmeter] section, to get a quicker image change when you are double clicking the image, I'd add a [!Redraw] bang to the LeftMouseDoubleClickAction option of the [Pictures1] and [Pictures2] meters. This way when you double click the image, the change is immediate. Without this bang you have to wait for the next update cycle to see the change. This is confusing especially if the Update is set to 5000, as it is in the original code.
  • eclectic-tech, I suppose you know, there isn't needed to add quotations around values of any option (you've added them into the PathName option of the [PLG1] and [PLG2] measures).
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Slide show pic sizes

CyborgTJB » July 13th, 2019, 11:33 am

Waao.... Learned lots of stuff about new Meters in single read. I was out this for like 2 years.
Thanks a lot....

I guess I have to learn more about new stuffs...
CyborG, I love and like to collect and join. :sly:
User avatar
balala
Rainmeter Sage
Posts: 8532
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Slide show pic sizes

balala » July 13th, 2019, 12:06 pm

CyborgTJB wrote:
July 13th, 2019, 11:33 am
I guess I have to learn more about new stuffs...
Yeah, there are a lot of new stuffs. Many new features were added lately. For instance: https://www.rainmeter.net/beta-4-3/
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Slide show pic sizes

CyborgTJB » July 13th, 2019, 12:39 pm

Hey Buddy... Happy to see you. Thanks for tip.
CyborG, I love and like to collect and join. :sly:
User avatar
balala
Rainmeter Sage
Posts: 8532
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Slide show pic sizes

balala » July 13th, 2019, 2:45 pm

:thumbup:
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Slide show pic sizes

CyborgTJB » July 16th, 2019, 2:43 am

Can I just give it a canvas of limited area?
I mean I want the images as they are. It's like H400 x W400 and every images should show within it but at same ratio.
e.g. The image about 564x564 should be cropped to 400x400 and show it within canvas.
The image about 1366x768 should cropped to 400x225 and show it within canvas.

This "PreserveAspectRatio=2" is tricky, I don't really understand it.
CyborG, I love and like to collect and join. :sly:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3476
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Slide show pic sizes

eclectic-tech » July 16th, 2019, 3:22 am

CyborgTJB wrote:
July 16th, 2019, 2:43 am
Can I just give it a canvas of limited area?
I mean I want the images as they are. It's like H400 x W400 and every images should show within it but at same ratio.
e.g. The image about 564x564 should be cropped to 400x400 and show it within canvas.
The image about 1366x768 should cropped to 400x225 and show it within canvas.

This "PreserveAspectRatio=2" is tricky, I don't really understand it.
There are several ways to limit what is displayed when the image size is variable. PreserveAspectRatio is one option, but you can also try ImageCrop to cut a portion of the image to the exact dimensions for your image meter.

Code: Select all

; Add to the image meter to crop a 400x400 pixel of the center of the image
ImageCrop=-200,-200,400,400,5
That may not give desirable results for larger images. You may need to use combinations of those 2 options (ImageCrop and PreserveAspectRation) and Width/Height to best display multiple image sizes.

Another option would be to define a container meter with the desired dimensions; everything outside of that meter size would not exist as far as the skin is concerned. You could resize the images as close as possible to the container meter size and it will "Crop" any extra dimensions.

If time permits, I will look at creating a sample skin using your base code, but tomorrow looks like it is going to be pretty busy :uhuh:
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Slide show pic sizes

CyborgTJB » July 16th, 2019, 4:42 am

I'll try with your "imageCrop" at evening.
And about time... You got it. I'm waiting.
But plz, explain what you do...
CyborG, I love and like to collect and join. :sly: