RMagick doesn't support HDRI ImageMagick #18

Closed
Benabik opened this Issue Oct 13, 2010 · 60 comments

Projects

None yet
@Benabik
Benabik commented Oct 13, 2010

I'm trying to get RMagick to work with Fink's imagemagick package, but I get the following error:

RMagick does not work when ImageMagick is configured for High Dynamic Range Images.
Don't use the --enable-hdri option when configuring ImageMagick.

Some web searching turns up a patch for pld-linux:

--- RMagick-2.13.0/ext/RMagick/rmimage.c~      2009-12-21 11:34:57.000000000 0100
+++ RMagick-2.13.0/ext/RMagick/rmimage.c       2010-03-03 13:58:39.770186927 0100
@@ -9815,7 +9815,7 @@
 #else
             IndexPacket *indexes = GetIndexes(image);
 #endif
-            old_color = image->colormap[*indexes];
+            old_color = image->colormap[(unsigned long)*indexes];
         }
         if (!image->matte)
         {
--- RMagick-2.13.0/ext/RMagick/extconf.rb~     2009-12-24 07:03:02.000000000 
0100
+++ RMagick-2.13.0/ext/RMagick/extconf.rb      2010-03-03 14:00:35.276124598 
0100
@@ -151,15 +151,6 @@

   $magick_version = `Magick-config --version`.chomp

-  # Ensure ImageMagick is not configured for HDRI
-  unless checking_for("HDRI disabled version of ImageMagick") do
-    not (`Magick-config --version`["HDRI"])
-  end
-    exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
-           "\nRMagick does not work when ImageMagick is configured for High 
ynamic Range Images."+
-           "\nDon't use the --enable-hdri option when configuring 
mageMagick.\n"
-  end
-
   # Save flags
   $CFLAGS     = ENV["CFLAGS"].to_s   + " " + `Magick-config --cflags`.chomp
   $CPPFLAGS   = ENV["CPPFLAGS"].to_s + " " + `Magick-config --cppflags`.chomp
@saurabhnanda

I'm stuck with the same problem. How does one solve this?

@bricef bricef added a commit to bricef/rmagick that referenced this issue Aug 19, 2013
@bricef bricef Attempt to fix bug #18 in original repo. (to enable Ruby bundling on …
…Arch Linux)
689271f
@joneshf
joneshf commented Aug 28, 2013

Having the same issue here on arch linux. Can anyone comment on @bricef's fix?

@bricef
Contributor
bricef commented Aug 28, 2013

@joneshf I have no idea what I'm doing :) My branch is nothing but the patch above applied. I haven't really had a look at it in any depth. Didn't even know that it would be cross referenced here.

@joneshf
joneshf commented Aug 29, 2013

Maybe not, but your branch worked to install over here, so it's worth a look.

@jk779
jk779 commented Sep 4, 2013

This affects me on recent Arch-Linux. Maintainers decided to enable hdri - have to build it from source now which is very pleasant. Here's the commit on the Arch-side:
https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/imagemagick&id=ba309a9904a66d9581e461cad7c648043246bb79

I don't think that they will change that. Can we achieve a solution on rmagick's side?

@mejymejy
mejymejy commented Sep 5, 2013

I'm with @jk779. How difficult is this change? What problem does enabling HDRI pose with the current rmagick?

@josemotanet

I also use Arch Linux and would like to see this fixed. 👍

@linduxed
linduxed commented Sep 6, 2013

Same situation here.

@acti-link

Please, fix this for Arch Linux :) +watching thread.

@heaven
heaven commented Sep 12, 2013

Same here. 👍

@whites11

+1

@peteonrails

@bricef's Fix works for me on Arch and I have not been able to find any ill effects, using both regular and HDR images. Has anyone issued a pull request to get this patch in to master?

@linduxed

While I think @bricef should go ahead and create a PR against master, considering there's been no activity on this repo for the past eight months, it might be easier to just use his fork.

@peteonrails

I agree that using @bricef's fork is easier once you've spent the time to find the solution. But to save future developers the time it takes to research the install issue, someone's got the beat a drum to get the root cause fixed.

Folks can help get this issue resolved by not only making a little noise, but by confirming that the patch in the Pull Request works, does not cause any production issues, and that you've tested it.

Thanks in advance!

@jhollinger

Ran across this while installing Redmine on Arch. Switched to @peteonrails's branch and it installed fine. I don't know what Redmine does with rmagick, but everything seems to work.

@joneshf
joneshf commented Sep 25, 2013

There's a package that fixes this hdri business https://aur.archlinux.org/packages/imagemagick-no-hdri/

@FND
FND commented Oct 3, 2013

Ran across this while installing Redmine on Arch. Switched to @peteonrails's
branch and it installed fine. I don't know what Redmine does with rmagick,
but everything seems to work.

Ditto for Vimdeck instead of Redmine.

@johnhamelink

@joneshf that package is out of date unfortunately

Would really like to see this implemented in master branch!

@budu
budu commented Nov 4, 2013

+1

@mmaiza
Collaborator
mmaiza commented Nov 4, 2013

This is now available on the master, I will not yet package it for rubygems until the tests are upgraded.

@mmaiza mmaiza closed this Nov 4, 2013
@joneshf
joneshf commented Nov 4, 2013

@mmaiza Thanks!

@heaven
heaven commented Nov 4, 2013

@mmaiza Thank you!

@dg-ratiodata

I will not yet package it for rubygems until the tests are upgraded.

@mmaiza As I'm not familiar with this gem + gem's tests. What tests need to be upgraded (and how)? Thx.

Cheers,
dg

@ioquatix

@mmaiza When are you going to release the update?

@til til referenced this issue in rubycorns/rorganize.it Jan 21, 2014
Closed

image update/ upload throws weird error #112

@gutenye
gutenye commented Jan 22, 2014

@mmaiza When are you going to release the update?

+1 I also use ArchLinux.

@ioquatix

@mmaiza Just wondering when you are going to release this updated gem?

@ioquatix

@mmaiza Bump.

@SirCmpwn

Updated gem when?

@Aethelflaed

Bump, same problem here with Archlinux an HDRI, when will the gem be updated ?

@ioquatix

@bf4 Perhaps you can help to get this moving?

@zarokima

@mmaiza

Would be really nice to have the updated gem released

@bf4
bf4 commented Jun 26, 2014

if the gem is updated, someone just fork, and release as 'yourname-rmagick'
until the gem owner can add someone else as owner, or you petition rubygems
with evidence that the gem is truly abandoned

@iangreenleaf

With bundler, it's possible to install the gem straight from GitHub:

gem 'rmagick', :git => 'https://github.com/rmagick/rmagick.git', :ref => '79e1708c7f6792a3a90cb8cb3ffaeb74c58e092e', :require => 'RMagick'

Still, it's much nicer to have an official gem version released, for a number of reasons.

@brain64bit

i'm using manjaro which is archlinux distribution, imagemagick-no-hdri solve this problem.

sudo yaourt imagemagick-no-hdri
@jk779
jk779 commented Jun 30, 2014

@brain64bit off topic: please be careful using yaourt with sudo as it compiles as root. just use it without sudo and it'll ask you for a password when installing.

@vltr
vltr commented Jul 5, 2014

@iangreenleaf thanks for the tip, it's the best solution so far for this problem until someone updates the official gem :)

@gpakosz
gpakosz commented Jul 24, 2014

will RMagick be ever updated to support HDRI?

@ioquatix

@gpakosz The original maintainer is AWOL...? I'm thinking of forking it and releasing an update. Anyone else think that is a good idea? Surely someone else must be involved in the "rmagick" organisation.

@bf4
bf4 commented Jul 24, 2014

READ THIS

I just forked this repo and imported its issues to https://github.com/gemhome/rmagick let me know if you want to get push there. I don't intend to maintain it myself, rather to enable its continuing maintenance, and help get a new release out.

@ioquatix

@bf4 I've emailed the original maintainer from ages ago, got a reply, not sure what the outcome will be yet. There was already a branch from @bricef which appears to work because he merged this PR. Will let you know tomorrow if there is any positive movement.

@ioquatix

@bf4 if we don't make any positive movement by the end of next week, lets work on the proposed fork you've created. Please give me commit access if that is okay.

@bf4
bf4 commented Jul 24, 2014

done

@linduxed

I'll post a blog post later today on the state of affairs with regards to the development of rmagick (I've had a few talks with the main developer).

@bf4
bf4 commented Jul 24, 2014

Anything you can share here for a tl;dr?

@linduxed

The TL;DR is that unless work happens on a fork, no work is going to happen.

Full explanation here.

@ioquatix

Nice. I've actually got in touch with the original maintainer before @mmaiza and asked him for his suggestions: @baror - he was responsive and hopefully something comes of this communication. I think that the easiest option would be to release one final gem for the 2.x branch and then perhaps focus on the 3.x release.

I've actually started using Ruby VIPS which is pretty good but pretty low level.

As a community I'm pretty sure we can pull our heads together and make a decent final release for 2.x and then start fixing issues (e.g. tests) for a 3.x release. We could remove a lot of legacy crap (support for ruby 1.5 etc)

@ioquatix

@linduxed Thanks for the detailed information about your communications.

It is clear to me that @mmaiza is doing the project a MASSIVE disservice by not updating the gem or working on the project or even communicating. If he isn't capable of writing the code himself he should at least engage the community as much as possible, pass on the responsibility to people who at least are passionate to get the ball rolling.

@bf4
bf4 commented Jul 25, 2014

@ioquatix I agree. This is a general problem in the Ruby ecosystem, where a project used by many can very easily become abandoned. What's particularly strange, here, is that the whole issue could be fixed if @mmaiza did two things:

  1. Add someone else as an owner to the rmagick org who can add more collaborators
  2. Add probably that same someone as an owner of the gem on rubygems.org gem owner -a myrubygemsaccountemail@example.com

I'm involved here, in part, because this is a part I'd like to help solve (or at least ameliorate). See the discussion on the rubygems-org list about creating a rubygems adoption center. https://groups.google.com/d/topic/rubygems-org/niS5ZO9DNgk/discussion

Though I'd prefer work continue here, especially since the gem is part of an org, which makes it super easy, I'm also a little excited to test-drive 'adopting' the gem at https://github.com/gemhome/rmagick

Adopting a gem is a huge pain. I'd love for there to a be a one-click button for a github repo/gem owner to click and transfer ownership / add as owner someone who can help maintain the gem.

@bf4
bf4 commented Jul 25, 2014

@baror can you just add me or someone as repo owner (or transfer it to another org) and gem owner and we'll take it from here?

@baror
Collaborator
baror commented Jul 25, 2014

Hey, everyone -

You can find the latest documentation that I know about for how to do a release here: https://github.com/rmagick/rmagick/wiki/Release-Process , but as you can see, it's almost four years old, so it's almost certainly stale.

Unfortunately, you need to get a bunch of permissions that only @mmaiza has. From this thread, it seems like the last time you all heard from @mmaiza was in November of last year.

Here's my plan:

  • I'll do my best to figure out how to give permissions to all the right systems (github, rubygems, etc.) to @bf4 . I can't guarantee anything, since I'm not an owner myself, but I'll see what I can do.
  • @bf4 should go ahead and add whoever else he sees fit as owners and then do a release.
  • If you don't hear back from @mmaiza after a while (maybe 3 weeks?), consider removing him as an owner.

Does that sound reasonable to everyone?

Thanks,

  • Omer.
@ioquatix

@baror sounds like a good plan of action.

@bf4
bf4 commented Jul 27, 2014

So, I have gem push now. Give me a hash to point to and I'll build a release candidate

@ioquatix

@bf4, I've been using the current master in production using :git => 'url' in bundler. I think if you do a minor point release with this version it would be great. After that, you can close this ticket, and I'd suggest we start working on a 3.x release updating tests to rspec and removing legacy code.

@bf4
bf4 commented Jul 27, 2014

Done. http://rubygems.org/gems/rmagick/versions/2.13.3.rc1 I think most of the release process should be deprecated in favor of gem build. need to confirm.. please confirm this release works...

I still don't have commit here, so we need to work on a fork, till @mmaiza gives me or someone else access (gem release is essentially unrelated to any repository)

@bf4
bf4 commented Jul 31, 2014

Ok, I'm going to push a real 2.13.3.

I've been looking at what part of the 'release process' is still required. Most of it looks like it can go and be replaced by gem build. The whole redcarpet conversion of README.rc to README.html doesn't seem to have been done for a while... and is buggy, thought it does appear to be at http://www.imagemagick.org/RMagick/doc/ which we (someone) needs to look into updating.

I'm moving work to gemhome/rmagick until we get control of this repo. At least we can merge that back in here if we get this back.

Hey, @linduxed we're famous! http://rubyweekly.com/issues/206 links to your post http://linduxed.com/blog/2014/07/25/the-state-of-rmagick-development/?utm_source=rubyweekly&utm_medium=email

@mockdeep

I came across this in ruby weekly. Thanks guys, I had some vague ambitions to fork it myself and do some code cleanup. Nice to see it maintained again.

@bf4
bf4 commented Jul 31, 2014

@mockdeep I'd be very happy to accept a few PRs or issue write-ups there then add you as a collaborator. (If we don't do it, no one will).

@mockdeep

Thanks, I'll add some cards to our team's open source board. I'm particularly interested in code quality and getting the tests passing.

It's sad to see so many projects falling away from being maintained. Some I've tried to contribute to only to get radio silence, others people ask if they can maintain and also don't get any response. Seems like there should be some sort of statute of limitations on rubygems for how long a gem can go without an update before it is released to be handled by another willing maintainer. Almost like renewing a domain...

@bf4
bf4 commented Jul 31, 2014

That's an interesting idea. You post it to the rubygems-org list
thread on the adoption center

@evazion evazion referenced this issue in evazion/danbooru Sep 20, 2014
@evazion evazion Bump rmagick to 2.13.3.
rmagick-2.13.2 is incompatible with versions of ImageMagick built with
--enable-hdri. This includes the version of ImageMagick supplied
with Arch Linux. This prevents rmagick, and consequently Danbooru,
from being installed on Arch Linux.

rmagick-2.13.3 fixed this issue. See rmagick/rmagick#18.
3e7344a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment