2013-02-18 14 views
6

Quale sarebbe l'approccio migliore per ottenere informazioni EXIF ​​da int8array che ha i miei dati di immagine. So che la questione è troppo semplificata, ma sono davvero bloccatoEXIF ​​da int8Array

Stavo pensando di usare questa libreria: https://github.com/vjeux/jDataView o la modifica di questa libreria: http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html

+1

http://blog.nihilogic.dk/2008/05/r eading-exif-data-with-javascript.html? – Bergi

+0

Voglio scrivere la mia funzione che è semplificata il più possibile. – Jacob

+0

Non è uno script abbastanza semplice? – Bergi

risposta

1

Si dovrebbe fare piccole modifiche a questo script, perché crea un proprio array di byte, ma questo fa esattamente ciò che si vuole:

https://github.com/jseidelin/exif-js

<html> 
<head> 
<script type="text/javascript" src="../binaryajax.js"></script> 
<script type="text/javascript" src="../exif.js"></script> 
</head> 
<body> 

Click the images to read Exif data. The first image tests reading single tags, while the other two simply show all available data. 
<br/><br/> 
<img src="DSCN0614_small.jpg" id="img1" /> 
<br/> 
<img src="Bush-dog.jpg" id="img2" /> 
<br/> 
<img src="dsc_09827.jpg" id="img3" /><br/> 
<script> 
document.getElementById("img1").onclick = function() { 
    EXIF.getData(this, function() { 
     var make = EXIF.getTag(this, "Make"), 
      model = EXIF.getTag(this, "Model"); 
     alert("I was taken by a " + make + " " + model); 
    }); 
} 

document.getElementById("img2").onclick = function() { 
    EXIF.getData(this, function() { 
     alert(EXIF.pretty(this)); 
    }); 
} 

document.getElementById("img3").onclick = function() { 
    EXIF.getData(this, function() { 
     alert(EXIF.pretty(this)); 
    }); 
} 

</script> 

</body> 
</html> 
Problemi correlati