-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support External Images #81
Conversation
Can you add a README docs and inline code example demonstrating this?
…On Wed, Jul 26, 2017 at 9:26 PM, Chinmay Pandhare ***@***.***> wrote:
Now browsers can load in external images onto the sequencer (or local
ones) using just the path of the file. Earlier, it was required to provide
a DataURL to Image Sequencer.
This can be done as long as CORS Restrictions aren't violated.
Should this be done via XMLHttpRequest? I don't see the benefit of doing
that actually.
------------------------------
You can view, comment on, or merge this pull request online at:
#81
Commit Summary
- Support External Images via Canvas
File Changes
- *M* dist/image-sequencer.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-0>
(47)
- *A* examples/red.png
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-1>
(0)
- *M* src/ImageSequencer.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-2>
(5)
- *M* src/LoadImage.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-3>
(42)
- *M* src/modules/_nomodule/PixelManipulation.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-4>
(2)
- *D* test.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-5>
(5)
- *M* test/image-manip.js
<https://github.com/publiclab/image-sequencer/pull/81/files#diff-6>
(9)
Patch Links:
- https://github.com/publiclab/image-sequencer/pull/81.patch
- https://github.com/publiclab/image-sequencer/pull/81.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#81>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-XfpWWfir-rbh2pnowj08DLueZCks5sR5LJgaJpZM4OkYEA>
.
|
Suppose this is my file directory:
And now in
I shall add a short explanation to README.md too |
this is great documentation, thanks!
…On Wed, Jul 26, 2017 at 11:05 PM, Chinmay Pandhare ***@***.*** > wrote:
Suppose this is my file directory:
.
├── index.html
├── images
│ └── image.jpg
└── js
└── image-sequencer.js
And now in index.html we can directly do the following, as far as CORS
Restrictions don't dome into picture:
sequencer.loadImage('images/image.jpg');
sequencer.loadImage('http://domain/path/file.jpg');
I shall add a short explanation to README.md too
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwmIzcu_6AVbqV9weXmG8e_czFiGks5sR6osgaJpZM4OkYEA>
.
|
I have updated the README. While we are at this, Should Image Sequencer allow Users on Node.js to directly load images from a URL? |
yes!
…On Thu, Jul 27, 2017 at 8:15 PM, Chinmay Pandhare ***@***.***> wrote:
I have updated the README.
While we are at this, Should Image Sequencer allow Users on Node.js to
directly load images from a URL?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ5zbBnECVAUqpKYGJsigeCXv-TN9ks5sSNOygaJpZM4OkYEA>
.
|
Done that. Some notes here:
|
Looks great! merge if you like, bump minor version number in keeping with SemVer - (new features). Do data URLs still work synchronously? If not, and the callback is now required, that's a breaking API change, so we should release a |
Thanks for all the kind words :-) No, DataURLs don't work synchronously now because large DataURLs will cause a problem and can trigger So do we call this a major update? We're still working on basic stuff, and specifications might change relatively rapidly, so maybe let's just wait for publishing a new version... What do you think about this? If we don't publish it it, we don't have to bump the version right? Sorry if I am being naïve here, I haven't handled versions before. These are just my thoughts... |
It's ok to bump the version number, in semver it's just a means of
communication to users and we don't have any yet!
…On Jul 28, 2017 3:38 PM, "Chinmay Pandhare" ***@***.***> wrote:
Thanks for all the kind words :-)
No, DataURLs don't work synchronously now because large DataURLs will
cause a problem and can trigger addSteps before the image loads leading
to a ReferenceError.
So do we call this a major update? We're still working on basic stuff, and
specifications might change relatively rapidly, so maybe let's just wait
for publishing a new version... What do you think about this? If we don't
publish it it, we don't have to bump the version right?
Sorry if I am being naïve here, I haven't handled versions before. These
are just my thoughts...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ9gK1PdFcDEH2kS-hgjM4wqEBWO5ks5sSjiUgaJpZM4OkYEA>
.
|
Yep! Okay! |
Now browsers can load in external images onto the sequencer (or local ones) using just the path of the file. Earlier, it was required to provide a DataURL to Image Sequencer.
This can be done as long as CORS Restrictions aren't violated.
Should this be done via XMLHttpRequest? I don't see the benefit of doing that actually.
Discussion started in #78