Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
Created June 19, 2014 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuc-arc-f/03c8985e22cbbcdfae6f to your computer and use it in GitHub Desktop.
Save kuc-arc-f/03c8985e22cbbcdfae6f to your computer and use it in GitHub Desktop.
CustomSlide.load_image = function ( item, ipos) {
console.log('#load_image=' + item.url );
var xhr = new XMLHttpRequest();
xhr.open('GET', item.url );
xhr.responseType = 'blob';
xhr.onload = function() {
console.log('#r.onload,url=' + item.url );
var image = new Image();
var objURL = URL.createObjectURL(xhr.response);
image.src = objURL;
image.onload = function() {
console.log('#image.onload.w='+ image.width + ',h='+ image.height);
CustomSlide.start_anim( image, mNUM_TIMER );
};
};
xhr.send();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment