Wikimedia
Create a LUA module that contains commonly-used image functions
Create Module:ImageUtils that should contain the following functions:
- //imageOrientation// - given a file name, it should return different values for portrait, landscape or square
- //isLandscape, isPortrait, isSquare, isUpright// - functions returning a boolean based on the return value of //imageOrientation// (Upright is the same as Portrait)
Docs
- Lua docs (look for File metadata)
- Example of testing LUA modules: https://www.mediawiki.org/wiki/Module:String/testcases (it uses this module)
Task tags
Students who completed this task
fba