title: How to maintain aspect ratio in case of rendering images using texture2D in WebGL to canvas?
body: <p>I have a image of width * height = 1442 * 1303,
  I am able to read them and render to canvas successfully via webgl's texture2D.</p>
  
  <p>In client side ,I am having a arraybuffer that gets the image data which is of size = width*height*4.</p>
  
  <p>So, How to maintain aspect ratio of the image when my canvas width and height is window.innerWidth*0.90 and window.innerHeight*0.90.</p>
  
  <p>Also, I have to directly render using arraybuffer via WEBGL 2dTexture so, I can't use any 2d canvs API such as drawImage. Please suggest something.</p>