lwip
lwip copied to clipboard
Detect image type from buffer
As discussed in EyalAr/lwip#87 . Please let me know if you feel like some parts need improvement. I'll be happy to make the needed adjustments.
Coverage decreased (-0.16%) when pulling d350eda317ecf99bf236d54e9c67f99696e6ba11 on StevenThuriot:master into d5602e3bf02d958deafe96058ca5f7b5520df495 on EyalAr:master.
@StevenThuriot thanks! I'm currently travelling; I'll give it a thorough look when I get back in a few days.
@StevenThuriot Haven't forgotten about this PR, just have been a bit busy recently. Hope I can take a look this week.
No problem, take your time :relaxed:
Some times the images has wrong extension because the users or systems change the extension when some application can’t open the image. So I add code to solve that problems. For example, one image can to finish with .jpg but the image encode is png, now the library throw an error because just reviews the extension and not the encode. To solve I had used image-type lib and some modifications on the code of obtain.js
I can't to send my changed.