1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-07-21 16:51:47 +02:00

compare deal with images leaving no json information

This commit is contained in:
Mikael Roos
2015-05-08 09:58:32 +02:00
parent 9eb2996d05
commit c87ba5087c
2 changed files with 9 additions and 1 deletions

View File

@@ -32,6 +32,10 @@ input[type=text] {
background-color: #fff;
}
.json {
min-height: 100px;
}
.top {
z-index: 10;
}

View File

@@ -60,7 +60,11 @@ window.CImage = (function(){
$.getJSON(this.value + "&json", function(data) {
json.innerHTML = "filename: " + data.filename + "\ncolors: " + data.colors + "\nsize: " + data.size + "\nwidth: " + data.width + "\nheigh: " + data.height + "\naspect-ratio: " + data.aspectRatio;
});
})
.fail(function() {
json.innerHTML = "Details not available."
console.log( "JSON error" );
});
// Display image in overlay
button.removeAttribute("disabled");