kolbyjack / MMM-Wallpaper

MagicMirror module to display wallpapers from various online sources
https://magicmirror.builders/
MIT License
99 stars 31 forks source link

Local photos won't display vertically #30

Closed DJ6sTep closed 2 years ago

DJ6sTep commented 3 years ago

I added my own local photos to the MMM-Wallpaper module (which are all portraits/vertically from my DSLR), but when I launch MM it displays all my photos horizontally. Some photos display the entire photo horizontally/landscape or the photo displays only the lower third of the photo still horizontally/landscape.

I've tried setting the orientation string, set it to "vertical" & tried to set the size to "contain".

Please advise if I'm not doing this properly or if you need to investigate this module. This module is perfect for what I'm looking for on my MM.

Cheers.

kolbyjack commented 3 years ago

The orientation setting is really poorly named, I should look into changing it. When I first made the module, it only fetched images from bing, which has vertical and horizontal versions of each daily wallpaper. Pexels is the only other source that uses the setting, though I've had several issues filed now where users expect it to either filter or rotate images based on the setting.

Setting the size to "contain" should change the scaling so that the entire image is displayed, instead of the default "cover" that ensures that the whole screen is filled, cutting off the edges of the image to make it fit.

It sounds like the browser you're using (or are you using the electron magicmirror app?) isn't honoring the exif rotation data in your images, or maybe something about the way I'm displaying them prevents the rotation data from being used. I don't have any images like that to test with, unfortunately, would you be able to provide one, or point me to a publicly available one? Without a test image, I don't know if there's anything I can do about this.

DJ6sTep commented 3 years ago

Thank you for the quick response. I'm using the magic mirror app, I set the orientation of my pi to vertical as well. I've attached a sample of the picture I'm trying to use (I just blacked out the main parts of the pic). But I tested this particular file & this is what gave me the orientation issues.

Let me know what you think I should be doing, I really appreciate your help & effort in this.

kolbyjack commented 3 years ago

Did you test with this image after editing it? I think the edit saved it as an actual vertical pic, it doesn't display horizontally for me.

If you could just take a picture of a blank wall with the same camera in a vertical orientation, that should work for testing.

DJ6sTep commented 3 years ago

I did test it after editing & it was still horizontal. Here are two other ones, I just took & tested.

Please let me know if these displayed vertical or horiztonal for you & if vertical, I can send you my config to review.

20210123_144543 DSC_2950

kolbyjack commented 3 years ago

Sorry it's taken a while to follow up, but these are displayed vertically for me. I think it must be a browser issue. Can you try setting up your config to allow the other hosts in your local network to connect (address: "0.0.0.0" or similar in the main part of config.js) and then load your magicmirror in a browser by visiting http://your.rpi.ip.address:8080/

DJ6sTep commented 3 years ago

Appreciate your response, that's weird it's vertically for you. Do you mean to edit my config file address to "0.0.0.0" & then launch MM via web browser?

kolbyjack commented 3 years ago

By default, magicmirror is only accessible from the machine where it is installed.  If you want to be able to load it from another machine, you have to tell it to listen on a different address in your config.js like so:

var config = {
  address: "0.0.0.0",
  port: 8080,
  ipWhitelist: [],
  ...

and then on your desktop machine, open chrome and visit http://your.magicmirror.ip.address:8080/