# RMagick + ImageMagick issues on OSX

**URL:** <https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836>\
**Category:** ruby-talk\
**Created:** [14 September 2005 22:41 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836 "2005-09-14T22:41:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [14 September 2005 22:41 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/1 "2005-09-14T22:41:11Z")

</div>

Hi,

I compiled and installed ImageMagick from scratch. Seemed to install  
fine. Also installed RMagick via gems. (all last night)

Magick::Image.from\_blob ain't working though.

irb(main):001:0\> require 'RMagick'  
=\> true  
irb(main):002:0\> Magick::Image.from\_blob(File.read("lodge.jpg"))  
=\> []

Where can I begin troubleshooting?

---

<div class="post-metadata">

**Author:** ![Tim\_Hunter](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@Tim\_Hunter](https://rubytalk.org/u/Tim_Hunter)\
**Post date:** [14 September 2005 23:16 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/2 "2005-09-14T23:16:34Z")

</div>

Joe Van Dyk wrote:

> Hi,
> 
> I compiled and installed ImageMagick from scratch. Seemed to install  
> fine. Also installed RMagick via gems. (all last night)
> 
> Magick::Image.from\_blob ain't working though.
> 
> irb(main):001:0\> require 'RMagick'  
> =\> true  
> irb(main):002:0\> Magick::Image.from\_blob(File.read("lodge.jpg"))  
> =\>
> 
> Where can I begin troubleshooting?

I get that behavior when I try to read a file that isn't an image. Two things to try:

1. Can ImageMagick display the image? Try  
&nbsp;&nbsp;display lodge.jpg

2. Can you simply read the image? Try this:  
&nbsp;&nbsp;img = Magick::Image.read('lodge.jpg')  
&nbsp;&nbsp;img.display

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [15 September 2005 03:32 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/3 "2005-09-15T03:32:45Z")

</div>

irb(main):002:0\> img = Magick::Image.read('lodge.jpg')  
Magick::ImageMagickError: no decode delegate for this image format `lodge.jpg':  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2:in `read'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2

I assume that means that imagemagick wasn't compiled with enough image  
support, right?

> **···**
>
> On 9/14/05, Timothy Hunter \<cyclists@nc.rr.com\> wrote:
> 
> > Joe Van Dyk wrote:  
> > \> Hi,  
> > \>  
> > \> I compiled and installed ImageMagick from scratch. Seemed to install  
> > \> fine. Also installed RMagick via gems. (all last night)  
> > \>  
> > \> Magick::Image.from\_blob ain't working though.  
> > \>  
> > \>  
> > \> irb(main):001:0\> require 'RMagick'  
> > \> =\> true  
> > \> irb(main):002:0\> Magick::Image.from\_blob(File.read("lodge.jpg"))  
> > \> =\>   
> > \>  
> > \> Where can I begin troubleshooting?  
> > \>  
> > \>
> > 
> > I get that behavior when I try to read a file that isn't an image. Two  
> > things to try:
> > 
> > 1. Can ImageMagick display the image? Try  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display lodge.jpg
> > 
> > 2. Can you simply read the image? Try this:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img = Magick::Image.read('lodge.jpg')  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img.display

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard6](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Ara.T.Howard6](https://rubytalk.org/u/Ara.T.Howard6)\
**Post date:** [15 September 2005 03:56 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/4 "2005-09-15T03:56:26Z")

</div>

don't suppose you want to hear that i spent all day compiling it for redhat  
enterprise boxes do you? 😉

(those of you using rpms out there should know they are badly broken).

there are only about 3700 image delegates to track down and compile - on the  
bright side they all google right up and compile easily.

good luck.

-a

> **···**
>
> On Thu, 15 Sep 2005, Joe Van Dyk wrote:
> 
> > irb(main):002:0\> img = Magick::Image.read('lodge.jpg')  
> > Magick::ImageMagickError: no decode delegate for this image format `lodge.jpg':  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2:in `read'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2
> > 
> > I assume that means that imagemagick wasn't compiled with enough image  
> > support, right?
> 
> # --
> 
> > email :: ara [dot] t [dot] howard [at] noaa [dot] gov  
> > phone :: 303.497.6469  
> > Your life dwells amoung the causes of death  
> > Like a lamp standing in a strong breeze. --Nagarjuna
> 
> ===============================================================================

---

<div class="post-metadata">

**Author:** ![Tim\_Hunter](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@Tim\_Hunter](https://rubytalk.org/u/Tim_Hunter)\
**Post date:** [15 September 2005 11:06 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/5 "2005-09-15T11:06:34Z")

</div>

Joe Van Dyk wrote:

> irb(main):002:0\> img = Magick::Image.read('lodge.jpg')  
> Magick::ImageMagickError: no decode delegate for this image format `lodge.jpg': from (irb):2:in `read'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2
> 
> I assume that means that imagemagick wasn't compiled with enough image  
> support, right?

In the README-OSX.txt file that comes with RMagick I outline a process for installing RMagick that gets the ImageMagick delegate libraries via Darwinports. It also shows how to determine if ImageMagick is configured the way you need it. Why don't you give that process a try and let me know how it turns out?

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [15 September 2005 15:10 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/6 "2005-09-15T15:10:33Z")

</div>

Actually, all I needed to do was:

sudo port install ghostscript  
sudo port install imagemagick  
sudo gem install rmagick

and it seems to work fine.

I'm getting some font errors when building the examples.  
RMagick: unable to read font `helvetica'.  
RMagick: unable to read font `Verdana'.

But I don't think I have any Microsoft fonts installed...

> **···**
>
> On 9/15/05, Timothy Hunter \<cyclists@nc.rr.com\> wrote:
> 
> > Joe Van Dyk wrote:  
> > \> irb(main):002:0\> img = Magick::Image.read('lodge.jpg')  
> > \> Magick::ImageMagickError: no decode delegate for this image format `lodge.jpg':  
> > \> from (irb):2:in `read'  
> > \> from (irb):2  
> > \>  
> > \> I assume that means that imagemagick wasn't compiled with enough image  
> > \> support, right?
> > 
> > In the README-OSX.txt file that comes with RMagick I outline a process  
> > for installing RMagick that gets the ImageMagick delegate libraries via  
> > Darwinports. It also shows how to determine if ImageMagick is configured  
> > the way you need it. Why don't you give that process a try and let me  
> > know how it turns out?

---

<div class="post-metadata">

**Author:** ![Tim\_Hunter1](https://avatars.discourse-cdn.com/v4/letter/t/3ec8ea/32.png) [@Tim\_Hunter1](https://rubytalk.org/u/Tim_Hunter1)\
**Post date:** [15 September 2005 16:36 UTC](https://rubytalk.org/t/rmagick-imagemagick-issues-on-osx/20836/7 "2005-09-15T16:36:34Z")

</div>

ImageMagick doesn't look up fonts dynamically. It has a couple of fixed  
sets it knows how to use. At config time you (or whoever is configuring  
it) tell IM which set(s) of fonts to use and where to find them.  
Whoever made the port did the configuring, so that version of  
ImageMagick is configured for them, not for you. This is one of the  
reasons I recommend installing from source. The short-cuts always seem  
to take longer...

Now that you've got all the dependent libraries installed it should be  
fairly easy to uninstall ImageMagick and re-install from source. It  
takes about 5-10 minutes on my Powerbook. Or I can try to coach you  
through manually editing the font config files. If you decide to go  
with the first option check out RMagick's README file, 'cause it's got  
lots of advice on how to configure ImageMagick.
