Incorrect columns value

Bug #4636 reported by Marcus Leyman
4
Affects Status Importance Assigned to Milestone
librmagick-ruby (Ubuntu)
Invalid
Medium
MOTURuby

Bug Description

breezy 5.10

When having read in an image from a blob (and probably from file although i haven't tested that) the columns attribute always return 0 whatever the width. Attribute returns the right values.

Related branches

Marcus Leyman (leyman)
description: updated
Changed in librmagick-ruby:
assignee: nobody → moturuby
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Could you be more specific? A code sample that exposed the bug?

Revision history for this message
Marcus Leyman (leyman) wrote : Code sample

# Picture = rails model describing table with column of type medium-sized blob named 'data'
# row 1 contain an image being 100 px wide, 200 px high

@picture = Picture.find(1)
img = Image.from_blob(@picture.data).first

<%= img.rows %> # displays 200 (correct)

<%= img.columns %> # displays 0 (incorrect)

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Could you please provide us with a standalone script that we could run to demonstrate the problem ? I personally don't use rails.

Revision history for this message
Marcus Leyman (leyman) wrote :

Unfortunately i can't seem to do that, i installed rmagick from a gem to solve my problem and now when i uninstall the gem and install from ubuntu-repo the bug doesn't occur anymore... i guess this either means it was my install that was at fault or that the gem-version is still on my system somehow.
Anyway here is a quick test that probably would have triggered the bug before i installed the gem.

---------8<------------

# rmagick-test.rb
# run with any image as argument

require 'RMagick'

ARGV.each { |file|
        img = Magick::Image::read(file).first
        puts "Size: #{img.columns}x#{img.rows}"
}

Revision history for this message
Lucas Nussbaum (lucas) wrote :

That's one of the reasons why rubygems sucks so much ...

Next time, please don't report a bug to the Ubuntu package if you are using a gem version of the package ...

Changed in librmagick-ruby:
status: New → Fixed
Revision history for this message
Marcus Leyman (leyman) wrote :

I wasn't using the gem when the bug occured, i was using the ubuntu-package or else i would not have reported it here i assure you. I installed the gem to solve the problem since i needed a working rmagick-installation because of the bug in the ubuntu-package.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Ok, I could reproduce the bug using the breezy version of librmagick-ruby1.8. The version in dapper seems to fix the problem.

(Actually, what I saw seem to be a different bug, but it doesn't change the fact that librmagick looks broken ...)

Changed in librmagick-ruby:
status: Fixed → New
Revision history for this message
Lucas Nussbaum (lucas) wrote :

This bug is similar to bug #1299. Solving #1299 would also solve this bug.

Changed in librmagick-ruby:
assignee: moturuby → nobody
Revision history for this message
Daniel Holbach (dholbach) wrote :

Please let the developer's decide which bug has a priority and which not. Thanks.

Revision history for this message
Hampton (hcatlin) wrote :

This is a real bug. Here is my test code.

require "RMagick"
include Magick

image = Magick::Image.read('12345678' + 'file.jpg')
puts image.columns

========

This will print out "0" when in fact, the file should have about 300 columns.

Also, because of the unfixed bug #1299, I had to append a random 8 digits before the file name.

Please roll this back in breezy. Most of us in production environments will not be going to dapper right away, and these bugs affects many, many people. Most people just get frustrated and compile. I would much rather use my packages.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

I've prepared an updated package for Breezy, available at http://tiber.tauware.de/~lucas/pkg/librmagick-ruby/

It builds and installs on Breezy, and fixes bugs 1299, 4636 and 26138. It is a new version of the library, but is unlikely to break anything since there was only additions to the API.

Also, the version currently in Breezy is severely broken, so I really think this is an interesting upgrade.

Changed in librmagick-ruby:
status: Unconfirmed → In Progress
Revision history for this message
Lucas Nussbaum (lucas) wrote :

This updated package won't get into breezy-backports (See bug 39095). Marking this bug as Rejected. Feel free to use the package on my homepage as a workaround.

Changed in librmagick-ruby:
status: In Progress → Rejected
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.