1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-30 19:09:51 +02:00

Loading images without depending on filename extension, fix #85.

This commit is contained in:
Mikael Roos
2015-03-06 13:00:21 +01:00
parent 169b99eab3
commit f5529c7431
9 changed files with 381 additions and 464 deletions

View File

@@ -829,6 +829,11 @@ if ($verbose) {
$url1 = '?' . htmlentities(urldecode(http_build_query($query)));
$url2 = '?' . urldecode(http_build_query($query));
echo <<<EOD
<!doctype html>
<html lang=en>
<meta charset=utf-8>
<title>CImage verbose output</title>
<style>body{background-color: #ddd}</style>
<a href=$url1><code>$url1</code></a><br>
<img src='{$url1}' />
<pre id="json"></pre>
@@ -837,7 +842,7 @@ if ($verbose) {
window.getDetails = function (url, id) {
$.getJSON(url, function(data) {
element = document.getElementById(id);
element.innerHTML = "filename: " + data.filename + "\\ncolors: " + data.colors + "\\nsize: " + data.size + "\\nwidth: " + data.width + "\\nheigh: " + data.height + "\\naspect-ratio: " + data.aspectRatio;
element.innerHTML = "filename: " + data.filename + "\\nmime type: " + data.mimeType + "\\ncolors: " + data.colors + "\\nsize: " + data.size + "\\nwidth: " + data.width + "\\nheigh: " + data.height + "\\naspect-ratio: " + data.aspectRatio;
});
}
</script>