librmagick-ruby returning incorrect image formats

Bug #291610 reported by roja
4
Affects Status Importance Assigned to Milestone
imagemagick (Ubuntu)
Fix Released
Undecided
Unassigned
librmagick-ruby (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: librmagick-ruby

based on "librmagick-ruby_2.5.1-1_all.deb"

following results seen on ubuntu:

$ irb

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'RMagick'
=> true
irb(main):003:0> m = Magick::Image::read("http://wdfw.wa.gov/wlm/living/graphics/bat.jpg")
=> [http://wdfw.wa.gov/wlm/living/graphics/bat.jpg=>/tmp/magick-XXqepdEr HTTP 850x815 850x815+0+0 DirectClass 8-bit 100kb]

should see:

$ irb

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'RMagick'
=> true
irb(main):003:0> m = Magick::Image::read("http://wdfw.wa.gov/wlm/living/graphics/bat.jpg")
=> [http://wdfw.wa.gov/wlm/living/graphics/bat.jpg=>/tmp/magick-XX5jx7sy JPEG 850x815 850x815+0+0 DirectClass 8-bit 100kb]

as can be seen the format reported in the first example is "HTTP" not "JPEG" as it should be... This is a major issue if image format identification is required by an application.

Revision history for this message
Bryan McLellan (btm) wrote :

I've posted on the Imagemagick upstream bug forum [1] asking if this is intended, but I found in the changelog "Return the actual image format for HTTP: or FTP: format" [2]

This is actually an imagemagick bug, not a ruby one:

$ /usr/bin/identify http://wdfw.wa.gov/wlm/living/graphics/bat.jpg
http://wdfw.wa.gov/wlm/living/graphics/bat.jpg=>/tmp/magick-XXXsBrtg HTTP 850x815 850x815+0+0 DirectClass 8-bit 100.77kb

[1] http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=13203
[2] http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10715

Changed in librmagick-ruby:
status: New → Fix Released
status: Fix Released → Invalid
Changed in imagemagick:
status: New → Confirmed
Revision history for this message
Bryan McLellan (btm) wrote :

This is fixed upstream and imagemagick=7:6.4.5.4.dfsg1-1ubuntu3 in jaunty includes the fixes.

$ /usr/bin/identify http://wdfw.wa.gov/wlm/living/graphics/bat.jpg
http://wdfw.wa.gov/wlm/living/graphics/bat.jpg=>/tmp/magick-XXczwGMv JPEG 850x815 850x815+0+0 8-bit

Changed in imagemagick:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.