Showing posts from September, 2016

Featured Post

Smart Product designer

download and purchase link:

Live preview :

Smart Product Designer is a  tool to create your own product and get directly from your website. It is well documented, very easy to customize and use. It is build using most advance technologies including javascript, jQuery and html5.
Features Choose different product from collectionAdd custom texts to product.Change text colorChange the size and font of the TextLet the user drag, move or remove elementsAdd images to product selected from art gallery or browse it from systemDesign both frontside and back-sideShows preview while designingDownload designVery easy to customize and useHere is the purchase link :

Show Image on canvas HTML5

Here is the sample code to select image from system and display it on html5 canvas and javascript:

Javascript code:
$("#selectedImage").change(function(e) { var URL =window.URL; var url = URL.createObjectURL([0]); img.src = url; img.onload =function() { var canvas =document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); var imgSize = calculateAspectRatioFit(img.width, img.height, canvas.clientWidth, canvas.clientHeight); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.drawImage(img, 0, 0, imgSize.width, imgSize.height); } }); function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { var ratio =Math.min(maxWidth / srcWidth, maxHeight / srcHeight); var rtnWidth = srcWidth * rat…