Skip to content

Added the option 'nounload' #7

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

Merged
merged 1 commit into from
Jul 11, 2012
Merged

Added the option 'nounload' #7

merged 1 commit into from
Jul 11, 2012

Conversation

royhaddad
Copy link
Contributor

If the image data was loaded into an object URL, this option prevents it from
being unloaded once the image is ready.

If the image data was loaded into an object URL, this option prevents it from
being unloaded once the image is ready.
@royhaddad
Copy link
Contributor Author

Without this option, in browsers with Files / Blobs, loaded images cannot be manipulated using pixastic (before doing anything, pixastic creates a second <img/>, and copies the src, which is a blob URL. The resulting GET fails because it has already been unloaded).

blueimp added a commit that referenced this pull request Jul 11, 2012
Added the option 'nounload'
@blueimp blueimp merged commit 103641c into blueimp:master Jul 11, 2012
@blueimp
Copy link
Owner

blueimp commented Jul 11, 2012

Thanks for your contribution.
I've refactored your commit slightly and renamed the option to noRevoke.

@joewood
Copy link
Contributor

joewood commented Jul 16, 2012

I think the code merge now breaks if 'option' is undefined. The line:

   if (oUrl && !options.noRevoke) {
                    loadImage.revokeObjectURL(oUrl);
   }

Needs to test for options being undefined before using it.

@blueimp
Copy link
Owner

blueimp commented Jul 16, 2012

Thanks Joe, your pull request has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants