MMM-ImageSlideshow
MMM-ImageSlideshow copied to clipboard
Max Width/Height and Alignment
I know you have included the "Fixed" width and Height which is nice, but I don't like when it stretches the picture. so when I choose just one, leaving the other default, it works great to keep portrait style pics in the designated area, (or landscape pics if I choose the other) but when I get a picture that is super wide or tall and it fixates that one side of the area it just bleeds over into my other modules . Can a feature to set MaxWidth and MaxHeight be implemented into this please. so that it will display the full image without stretching and just limit it's boundaries? And also a simple "AlignImage: Center/right/left" would also be awesome to have as well.
I know that all these things should be doable from the "Custom.css" but no matter what I type into that file and save, it does nothing to change the layout or placement of the pics. I've been having to resize every image to the exact pixel ratio to fit the module area and it's quite tedious. This is for a school Broadcast TV at the front entrance. Anywho, It would just be nice to have these features built into the module so I can be done with this headache. thank you.
Hi, just another user here... I found the same thing so added a parameter to a forked version. The intent is to add a CSS parameter to the image in order to control the image display. I have no idea what systems it will be compatabile with - My reference system is a Raspberry Pi, now running Raspbian Buster - Noobs edition.
Check it out, let us know how it goes.. https://github.com/OneOfTheInfiniteMonkeys/MMM-ImageSlideshow
Health warning - 'It might have bugs'. Sanity safeguard - Backup files and take care editing, as things are easy to break.
Hi, here is a simple fix to define a fixed rectangular position, and not stretching images: in modules/MMM-ImageSlideshow/MMM-ImageSlideshow.js, modify the line 146:
if (styleString != '') image.style = styleString + '; object-fit: contain';
(With fixedImageWidth and fixedImageHeight set in your config.js file)
Hope this helps ;)