Giter Club home page Giter Club logo

mmm-imageslideshow's Introduction

Module: Image Slideshow

The MMM-ImageSlideshow module is designed to display images, one at a time on a fixed interval, from one or many directories. These images can be shown in order or at random, one directory at a time or all at time. The image heights and widths can be fixed, and the images can be made to be shown in grayscale.

Dependencies / Requirements

This module requires no special dependencies. The only requirement is that the image directories you path to are fixed paths accessible to the Magic Mirror instance.

Operation

This module will take in a list of directory paths, one or more, containing image files. The module will display those images in either alphabetical or random order, across either each path one at time or across all the paths at once. Once all the images have been shown, it will loop back and start again.

Extra configurations include setting the amount of time an image is shown for, rendering the images in grayscale, selecting which file extensions are valid, and using a fixed image height and/or width.

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
	{
		module: 'MMM-ImageSlideshow',
		position: 'bottom_left',
		config: {
			imagePaths: ['modules/MMM-ImageSlideshow/example1']
		}
	}	
]

Configuration options

The following properties can be configured:

Option Description
imagePaths Array value containing strings. Each string should be a path to a directory where image files can be found.

Example: ['modules/MMM-ImageSlideshow/example1']
This value is REQUIRED
slideshowSpeed Integer value, the length of time to show one image before switching to the next, in milliseconds.

Example: 6000
Default value: 10000
This value is OPTIONAL
delayUntilRestart Integer value, the length of time to restart the slideshow after the last image has been shown, in milliseconds. The module will go blank will waits to restart. This value defaults to zero, meaning no delay until restarting.

Example: 6000
Default value: 0
This value is OPTIONAL
fixedImageWidth Integer value, sets a fixed pixel width for all the images to be shown. If set to 0, the image's actual width is used.

Example: 250
Default value: 0
This value is OPTIONAL
fixedImageHeight Integer value, sets a fixed pixel height for all the images to be shown. If set to 0, the image's actual height is used.

Example: 300
Default value: 0
This value is OPTIONAL
randomizeImageOrder Boolean value, if true will randomize the order of the images, if false will use an alphabetical sorting by filename.

Example: true
Default value: false
This value is OPTIONAL
treatAllPathsAsOne Boolean value, if true will treat all the paths specified in imagePaths as one path. Otherwise, if false, images will only be shown from one path at a time in the order of imagePaths, until all the images in that path are exhausted, before continuing to the next path.

Example: true
Default value: false
This value is OPTIONAL
makeImagesGrayscale Boolean value, if true images will be rendered in grayscale (i.e black and white) instead of color. If false they will be rendered as just they are without change.

Example: true
Default value: false
This value is OPTIONAL
validImageFileExtensions String value, a list of image file extensions, seperated by commas, that should be included. Files found without one of the extensions will be ignored.

Example: 'png,jpg'
Default value: 'bmp,jpg,gif,png'
This value is OPTIONAL

mmm-imageslideshow's People

Contributors

adammoses-github avatar 1dollarbob avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.