title: Converting .HEIC to JPEG using imagick in C#
body: <p>I'm having trouble in converting heic file to jpeg</p>
  
  <p>I have already tried searching it online, i can find how to write to a folder but not how to get a byte[] of a converted file so that i can save it</p>
  
  <pre><code>       byte[] file = null;
          file = Convert.FromBase64String(dto.File);
  
          //Convert HEIC/HEIF to JPF
          if (extension == "HEIC" || extension == "HEIF")
          {
            try
            {
             using (MagickImageCollection images = new MagickImageCollection())
              {
                images.Read(file);
                using (IMagickImage vertical = images.AppendVertically())
                {
                  var imgname = filename + ".jpeg";
                  vertical.Format = MagickFormat.Jpeg;
                  vertical.Density = new Density(300);
                  vertical.Write(imgname);
                  extension = "jpeg";
              }
              }
            }
            catch (Exception ex)
            {
              Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            }
          }
              documentId = Service.AddSupportingDocument(file, extension , userName);
  </code></pre>
  
  <p>I'm not able to get the output file, it's just a string</p>