mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 20:00:05 +01:00
Update README.md
This commit is contained in:
@@ -201,15 +201,17 @@ var sequencer = ImageSequencer();
|
|||||||
### Loading an Image into the Sequencer
|
### Loading an Image into the Sequencer
|
||||||
|
|
||||||
The `loadImage` method is used to load an image into the sequencer. It accepts
|
The `loadImage` method is used to load an image into the sequencer. It accepts
|
||||||
a name and an image. The method also accepts an optional callback.
|
an image `src`, either a URL or a data-url. The method also accepts an optional callback.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
sequencer.loadImage(image_src, optional_callback);
|
sequencer.loadImage(image_src, optional_callback);
|
||||||
```
|
```
|
||||||
|
|
||||||
On `Node.js` the `image_src` may be a DataURI or a local path or a URL.
|
On `Node.js` the `image_src` may be a DataURI or a local path or a URL.
|
||||||
|
|
||||||
On browsers, it may be a DatURI, a local image or a URL (Unless this violates
|
On browsers, it may be a DatURI, a local image or a URL (Unless this violates
|
||||||
CORS Restrictions). To sum up, these are accepted:
|
CORS Restrictions). To sum up, these are accepted:
|
||||||
|
|
||||||
* Images in the same domain (or directory - for a local implementation)
|
* Images in the same domain (or directory - for a local implementation)
|
||||||
* CORS-Proof images in another domain.
|
* CORS-Proof images in another domain.
|
||||||
* DataURLs
|
* DataURLs
|
||||||
|
|||||||
Reference in New Issue
Block a user