Azure-Samples / function-image-upload-resize

Sample function in Azure Functions that demonstrates how to upload and resize images in Azure Storage.
MIT License
67 stars 161 forks source link

Images with an upper case extension throw errors #18

Open smillerk2 opened 4 years ago

smillerk2 commented 4 years ago

The GetEncoder() function correctly checks for upper case extensions:

var isSupported = Regex.IsMatch(extension, "gif|png|jpe?g", RegexOptions.IgnoreCase);

However, the switch statement following does not so if the uploaded image is test.PNG then errors are reported:

No encoder support for: test.PNG