All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.blueimp-load-image.js.load-image-exif.min.js Maven / Gradle / Ivy

Go to download

File Upload widget with multiple file selection, drag and drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

There is a newer version: 1.2.2.1-jre17
Show newest version
(function(a){if(typeof define==="function"&&define.amd){define(["./load-image","./load-image-meta"],a)}else{if(typeof module==="object"&&module.exports){a(require("./load-image"),require("./load-image-meta"))}else{a(window.loadImage)}}})(function(a){a.ExifMap=function(){return this};a.ExifMap.prototype.map={Orientation:274};a.ExifMap.prototype.get=function(b){return this[b]||this[this.map[b]]};a.getExifThumbnail=function(d,c,b){if(!b||c+b>d.byteLength){console.log("Invalid Exif data: Invalid thumbnail data.");return}return a.createObjectURL(new Blob([d.buffer.slice(c,c+b)]))};a.exifTagTypes={1:{getValue:function(c,b){return c.getUint8(b)},size:1},2:{getValue:function(c,b){return String.fromCharCode(c.getUint8(b))},size:1,ascii:true},3:{getValue:function(d,b,c){return d.getUint16(b,c)},size:2},4:{getValue:function(d,b,c){return d.getUint32(b,c)},size:4},5:{getValue:function(d,b,c){return(d.getUint32(b,c)/d.getUint32(b+4,c))},size:8},9:{getValue:function(d,b,c){return d.getInt32(b,c)},size:4},10:{getValue:function(d,b,c){return(d.getInt32(b,c)/d.getInt32(b+4,c))},size:8}};a.exifTagTypes[7]=a.exifTagTypes[1];a.getExifValue=function(n,m,g,l,e,b){var o=a.exifTagTypes[l];var d;var f;var p;var h;var k;var j;if(!o){console.log("Invalid Exif data: Invalid tag type.");return}d=o.size*e;f=d>4?m+n.getUint32(g+8,b):g+8;if(f+d>n.byteLength){console.log("Invalid Exif data: Invalid data offset.");return}if(e===1){return o.getValue(n,f,b)}p=[];for(h=0;hh.byteLength){console.log("Invalid Exif data: Invalid directory offset.");return}j=h.getUint16(c,g);b=c+2+12*j;if(b+4>h.byteLength){console.log("Invalid Exif data: Invalid directory size.");return}for(d=0;dh.byteLength){console.log("Invalid Exif data: Invalid segment size.");return}if(h.getUint16(e+8)!==0){console.log("Invalid Exif data: Missing byte alignment offset.");return}switch(h.getUint16(g)){case 18761:b=true;break;case 19789:b=false;break;default:console.log("Invalid Exif data: Invalid byte alignment marker.");return}if(h.getUint16(g+2,b)!==42){console.log("Invalid Exif data: Missing TIFF marker.");return}i=h.getUint32(g+4,b);f.exif=new a.ExifMap();i=a.parseExifTags(h,g,g+i,b,f);if(i&&!j.disableExifThumbnail){d={exif:{}};i=a.parseExifTags(h,g,g+i,b,d);if(d.exif[513]){f.exif.Thumbnail=a.getExifThumbnail(h,g+d.exif[513],d.exif[514])}}if(f.exif[34665]&&!j.disableExifSub){a.parseExifTags(h,g,g+f.exif[34665],b,f)}if(f.exif[34853]&&!j.disableExifGps){a.parseExifTags(h,g,g+f.exif[34853],b,f)}};a.metaDataParsers.jpeg[65505].push(a.parseExifData)});




© 2015 - 2025 Weber Informatics LLC | Privacy Policy