title: Covert image to base64 and set max width and max height of image
body: <p>I have one image runat server,with id => myImageId, Image src is in <strong>base64</strong></p>
  
  <pre><code>var convertedImage = Convert.ToBase64String(
                      File.ReadAllBytes(somePath),
                  );
  myImageId.Src = @"data:image/gif;base64," + convertedImage ;
  </code></pre>
  
  <p>I want to resize this image if is very big (max_width = 400; max_height = 400), in aspx page I can to set attribute '<code>max-width</code>' and '<code>max_height</code>' but converted image have same resolution, how I can to resize image before convert to base 64 to set max width and height?</p>