octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: imread: invalid image file: Magick++ exception --with-quantum


From: marco atzeri
Subject: Re: error: imread: invalid image file: Magick++ exception --with-quantum-depth=16
Date: Sat, 10 Mar 2012 06:52:52 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 3/10/2012 6:19 AM, 龙永彪 wrote:
Hello, I'm using Ubuntu 11.10 on a i686 machine. The version of
Octave in software center is still 3.2.4. So I decide to compile it
from source. I got some warning and errors when run the 'imread`
command:
     warning: your version of GraphicsMagick limits images to 16
                  bits per pixel
     error: imread: invalid image file: Magick++ exception: Magick
             No decode delegate for this image format () reported by
             magick/constitute.c:8279  (ReadImage)
     error: called from:
     error:   /home/longyb/temp/octave-3.6.1/scripts/image/imread.m
             at line 74, column 7

This is what I did from the very begining:

1. Download ftp://ftp.gnu.org/gnu/octave/octave-3.6.1.tar.gz
2. run sudo apt-get install build-dep octave3.2
3. Unpack octave-3.6.1.tar.gz, change to octave-3.6.1 directory.
4. run ./configure --prefix=/home/longyb/octave-3.6.1, then make
5. ./run-octave
6. in octave prompt, run the example code
          I = imread ("myimage.jpg");
     I got a warning, your version of GraphicsMagick limits images
     to 8 bits per pixel

7. After googling, I know it's a bug. see [1]
    The cause is that graphicsmagick didn't build with
    --with-quantum-depth=16,
8. So I decide to rebuild graphicsmagick myself.
9. I follow the instructions in [2] to rebuild graphicsmagick. Briefly,
        sudo apt-get install build-essential fakeroot
        sudo apt-get build-dep libgraphicsmagick++3
        cp graphicsmagick-1.3.12 to-some-dir
        cd $to-some-dir/graphicsmagick-1.3.12
        vi ./debian/rules, add '--with-quantum-depth=16 \' after
              the line that says --enable-libtool-verbose \”
        debuild -i -us -uc -b
        cd $to-some-dir/
        sudo dpkg --install
libgraphicsmagick++3_1.3.12-1build1_i386.deb
libgraphicsmagick1-dev_1.3.12-1build1_i386.deb
        sudo dpkg --install
libgraphicsmagick++1-dev_1.3.12-1build1_i386.deb
libgraphicsmagick1-dev_1.3.12-1build1_i386.deb
10. re-configure and re-make octave, then ./run-octave
11. in octave prompt, run the example code
          I = imread ("myimage.jpg");
      I got
          warning: your version of GraphicsMagick limits images to 16
                       bits per pixel
          error: imread: invalid image file: Magick++ exception: Magick:
                  No decode delegate for this image format () reported by
                  magick/constitute.c:8279  (ReadImage)
          error: called from:
          error:   /home/longyb/temp/octave-3.6.1/scripts/image/imread.m
                   at line 74, column 7

I googled it and found no useful information. I don't know what cause
the problem. I need help, any suggestions are greatly appreciated!

[1] http://savannah.gnu.org/bugs/index.php?30715
[2] 
http://jethomson.wordpress.com/2010/08/22/enable-octave-to-read-16-bit-images/

--
Best Regards

what your "gm version" and "gm identify myimage.jpg" report ?

is /usr/lib/GraphicsMagick-1.3.12/config/delegates.mgk in place ?

by the way 1.3.12 had some issue with octave and it should be better to use the latest 1.3.14

Regards
Marco






reply via email to

[Prev in Thread] Current Thread [Next in Thread]