cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Get the mime type from the data-uri string with a regex #88

Closed daco closed 7 years ago

daco commented 7 years ago

I always get a png image, even when loading a jpg. This is my second attempt to fix this with a regex on the data uri string. Now using a substring because the data uri can be very long and the regex will not perform very well on long strings.

cstefanache commented 7 years ago

thanks!