title: how to resize base64 image in angular
body: <p>i try to resize base64 image But I did not find an answer. I tried canvas but did not answer. I do not know why ...
  This was the code</p>
  
  <pre><code>const canvas = document.createElement('canvas'),
               ctx = &lt;CanvasRenderingContext2D&gt;canvas.getContext('2d');
          canvas.width = 100;
          canvas.height = 100;
          const img = new Image();
          img.src = this.SelectedFile.src;
          ctx.drawImage(img , 0, 0, 100, 100);
          this.SelectedFile.src = ctx.canvas.toDataURL();
  </code></pre>
  
  <p>Does anyone know any other way or knows what the problem is?</p>