Code Monkey home page Code Monkey logo

group4layers / ex_image_info Goto Github PK

View Code? Open in Web Editor NEW
94.0 2.0 3.0 661 KB

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.

Home Page: https://hex.pm/packages/ex_image_info

License: Other

Elixir 100.00%
elixir elixir-lang elixir-library image-processing image size dimensions performance image-recognition

ex_image_info's People

Contributors

nozalr avatar rnoz avatar warmwaffles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ex_image_info's Issues

ExImageInfo.info/1 and .info/2 don't match for :webp

Hello,
The ExImageInfo.info/1 and ExImageInfo.info/2 function returns nil in many cases for the webp format. When we use the ExImageInfo.type or ExImageInfo.seems? functions it works fine.

Here has an example

url = "https://media3.giphy.com/media/jHCmUxSNgRjCOYDHiT/giphy.webp"
{:ok, %HTTPoison.Response{body: image}} = HTTPoison.get(url, []) 
ExImageInfo.type(image) # {"image/webp", "webpVP8"}
ExImageInfo.info(image) # nil

There is something that can be done, or the problem is with the picture itself?

PSD mime should be image/vnd.adobe.photoshop ?

Hello, thanks for this useful library.
Is possible to configure different mime types to respond to .PSD? I believe that the format should be image/vnd.adobe.photoshop as documented in some mime types databases.
Would you accept a pull request for this?

Add matching for :jpg

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.