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