Group4Layers / ex_image_info

ExImageInfo is an Elixir library to parse images (binaries) and get the dimensions (size), detected mime-type and overall validity for a set of image formats. It is the fastest and supports multiple formats.
https://hex.pm/packages/ex_image_info
Other
95 stars 4 forks source link

Add matching for :jpg #1

Closed webdeb closed 6 years ago

webdeb commented 6 years ago

Hi, we are using your lib and checking for the correct type by parsing the ext name of an image and calling seems?(binary, to_atom(ext))

For jpegs the ext is usually .jpg. So I thought maybe we could add a second matching: def seems?(binary, :jpg), do: JPEG.seems?(binary) after the the original :jpeg.

What do you think?

nozalr commented 6 years ago

Hi, although the standard specifies "jpeg" and not "jpg" (this is something that comes from Windows), we decided to include it for you. Check it out ;)

webdeb commented 6 years ago

Wow, thats just Awesome! Thank you very much 👍