Skip to main content

Posts

Showing posts from April, 2015

WhatsApp on PC

WhatsApp has become the top messaging media nowadays. Now people don't spend money on sending messages including music, pictures and any type of file to anybody. They just use WhatsApp in order to do these kind of tasks. There is no limit of messages in this tiny but powerful application. Recently WhatsApp launched their web portal for sending and receiving messages. You can do it with following steps. Visit  http://web.whatsapp.com/ Scan QR code with your mobile camera. Enjoy free messages. Your phone needs to stay connected to internet in order to work with web client. This feature is not yet enabled for iOS due to platform limitation as of today date.

Draw Image in canvas by maintaining its Aspect Ratio

I have looking for a solution for drawing Image in canvas by maintaining its Aspect Ratio. After so much research and reading articles I successfully implemented in my project by combining inputs from them specially this . I decided to share my solution with you people. So here it is. <!DOCTYPE html> <html> <body> <label> Image File: </label><br/> <input type= "file" id= "fileControl" name= "fileControl" /> <div style= "border:1px solid red;align:center" > <canvas id= "imageCanvas" ></canvas> </div> <script> var fileControl = document .getElementById( 'fileControl' ); fileControl.addEventListener( 'change' , handleImage, false ); var canvas = document .getElementById( 'imageCanvas' ); var ctx = canvas.getContext( '2d' ); function handleImage(e){ var reader = new FileReader(); rea...