carl lazarus

carl lazarus

  • NA
  • 3
  • 3.8k

Resize .Webp Image

Aug 12 2019 2:04 AM
I had converted Jpg to Webp but i unable to Resize Webp Images
  1. var webpFileName = file.FileId + ".webp";  
  2. using (Bitmap bitmap = new Bitmap(jpgFileName))  
  3. {  
  4. using (var saveImageStream = System.IO.File.Open(webpFileName, FileMode.Create))  
  5. {  
  6. var encoder = new SimpleEncoder();  
  7. encoder.Encode(bitmap, saveImageStream, 20);  
  8. }  
  9. } 

Answers (1)