jenfr
Canvas based image loader
Requirements
Promise
Example
const jenfr = pics = "file1.jpg" "file2.jpg" "file3.jpg" "file4.jpg" "file5.jpg" target = document; Promiseallpics;
API
jenfr(Element[, imageUrl, options]) Promise ([canvas, context, image])
Creates a canvas with the supplied options. A fallback img
Element will be created with imageUrl
if the Client cannot create a canvas
.
To get the natural width
& height
of the image, do not specify in options
, e.g. {}
.
;
Options
Canvas
attributes can be specified, as well as context
methods with an Array
of arguments.
scale (Boolean)
Scales the image to fit inside the canvas if a width
& height
are specified.
;
How can I load jenfr?
jenfr supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install jenfr), or using a script tag.
License
Copyright (c) 2016 Jason Mulligan Licensed under the BSD-3 license