我试图从红宝石-贵宾宝石获取图像EXIF数据,但是我一直在接收错误。我已经找到了试图修复此问题的其他人提供的文件,并且我尝试了他们的修复,但没有成功。
i=VIPS::Image.new("/home/eric/Pictures/golden-clouds-wallpaper.jpg")
i.get("exif-Orientation")
i.get("exif-ifd0-Orientation")两者都有错误:
VIPS error: vips_image_get: field "exif-Orientation" not found
VIPS error: vips_image_get: field "exif-ifd0-Orientation" not foundUbuntu版本13.10
贵宾7.28.5版
ruby-vips 0.3.7
编辑
2.1.0 :001 > require 'rubygems' => false
2.1.0 :002 > require 'vips' => true
2.1.0 :003 > a = VIPS::Image.new('/home/eric/Pictures/devProfile.JPG') => #<VIPS::Image:0x00000001e4d7b0>
2.1.0 :004 > a.get("exif-Orientation")
VIPS::Error: VIPS error: vips_image_get: field "exif-Orientation" not found
from (irb):4:in `get'
from (irb):4
from /home/eric/.rvm/rubies/ruby-2.1.0/bin/irb:11:in `<main>'发布于 2014-02-12 08:56:53
安装贵宾图形用户界面,nip2,然后尝试加载您的JPEG图像。右击缩略图,选择标题,查看显示的字段.你应该看看里面的方向。
我这里有Ubuntu 13.10 / vips-7.28.5 /ruby 0.3.7,我看到:
$ vips --version
vips-7.28.5-Sat Mar 9 18:46:42 UTC 2013
$ gem install ruby-vips
Fetching: ruby-vips-0.3.7.gem (100%)
Building native extensions. This could take a while...
Successfully installed ruby-vips-0.3.7
1 gem installed
Installing ri documentation for ruby-vips-0.3.7...
Installing RDoc documentation for ruby-vips-0.3.7...
$ irb
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'vips'
=> true
irb(main):003:0> a = VIPS::Image.new("pics/img_2522.jpg")
=> #<VIPS::Image:0x00000001a0e528>
irb(main):004:0> a.get("exif-Orientation")
=> "1 (Top-left, Short, 1 components, 2 bytes)"
irb(main):005:0> https://stackoverflow.com/questions/21560509
复制相似问题