How to retrieve EXIF information of an image in Rails

后端 未结 4 1055
囚心锁ツ
囚心锁ツ 2021-02-12 12:23

I am using Rails paperclip for displaying the images in my page. I want to know how to retrieve EXIF information of an image(like dimensions, camera model,height,width., etc).Ca

4条回答
  •  天涯浪人
    2021-02-12 12:51

    You might try the mini_exiftool gem, a wrapper for the exiftool command-line tool.

    While the gem requires you to actually install the command-line tool, the result is that you get a lot more power. Compared to exifr, which only gives you support for JPG and TIF files, exiftool supports a huge number of file formats. It also supports reading and writing of exif data, whereas exifr only supports reading.

提交回复
热议问题