Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (24 sloc) 935 Bytes
<html>
<head>
<script language = "JavaScript">
window.onload = function()
{
var newImage = new Image;
newImage.onload = function() {
var imgElement = document.getElementById("img1");
imgElement.src = this.src;
}
// First apply a square operation, then convert to PNG format.
var paramOperation1 = "square";
var paramValue1 = 100;
var paramOperation2 = "format";
var paramValue2 = "png"; // Other formats available: jpg, gif, tiff and webp.
var imageURL = "http://images.rethumb.com/image_coimbra_600x300.jpg";
newImage.src = "http://api.rethumb.com/v1/" + paramOperation1 + "/" + paramValue1 + "/" + paramOperation2 + "/" + paramValue2 + "/" + imageURL;
}
</script>
</head>
<body>
<img id="img1">
</body>
</html>
You can’t perform that action at this time.