function readImageFile(f){
    if(f.type.startsWith("image")){
        var reader = new FileReader();
        reader.onload = function (e) {
            var imgData = {
                name : f.name,
                data: e.target.result
            };
            imagesData[f.name] = imgData
            addToSlider(imgData);
        }
        reader.readAsDataURL(f);
    }
}
/*read an image file and add to slider*/
read an image file and add to slider
read an image file and add to slider
function readImageFile(f){
    if(f.type.startsWith("image")){
        var reader = new FileReader();
        reader.onload = function (e) {
            var imgData = {
                name : f.name,
                data: e.target.result
            };
            imagesData[f.name] = imgData
            addToSlider(imgData);
        }
        reader.readAsDataURL(f);
    }
}
function readImageFile ( f ) { if ( f . type . startsWith ( "image" ) ) { var reader = new FileReader ( ) ; reader . onload = function ( e ) { var imgData = { name : f . name , data : e . target . result } ; imagesData [ f . name ] = imgData addToSlider ( imgData ) ; } reader . readAsDataURL ( f ) ; } }
read an image file and add to slider
read an image file and add to slider