tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

image-orientation-from-image.html (944B)


      1 <!DOCTYPE>
      2 <head>
      3  <style>
      4    body {
      5      border:  0px;
      6      margin:  0px;
      7      padding: 0px;
      8    }
      9    img {
     10      image-orientation: from-image;
     11      border:  50px solid black;
     12      margin:  50px;
     13      padding: 50px;
     14    }
     15  </style>
     16 </head>
     17 <body>
     18  <img id="image">
     19 
     20  <script>
     21    var orientationInfo = location.search.substring(1).split("&");
     22    var angle = orientationInfo[0];
     23    var flip = orientationInfo[1] == "flip" ? true : false;
     24 
     25    // Determine the final image file. 'none' is special-cased since its
     26    // filename doesn't quite follow the same pattern as the others.
     27    var imageFile;
     28    if (angle == "none") {
     29      imageFile = "image-exif-none.jpg";
     30    } else {
     31      var imageFile = "image-exif-"
     32                    + angle
     33                    + "-deg"
     34                    + (flip ? "-flip" : "")
     35                    + ".jpg";
     36    }
     37 
     38    document.getElementById('image').src = imageFile;
     39  </script>
     40 </body>