[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading and average PGM files
From: |
Carnë Draug |
Subject: |
Re: Loading and average PGM files |
Date: |
Mon, 18 Jun 2012 14:37:01 +0100 |
On 18 June 2012 14:25, Carnë Draug <address@hidden> wrote:
> On 18 June 2012 13:51, Laurent Hoeltgen <address@hidden> wrote:
>> Hi,
>>
>> tried it on ubuntu 11.10 with octave 3.6.1 and I get the following:
>>
>> warning: your version of GraphicsMagick limits images to 8 bits per pixel
>> error: imread: invalid image file: Magick++ exception: Magick: Invalid
>> colormap index (index 65287 >= 256 colors,
>> /home/laurent/Downloads/1.pgm) reported by magick/colormap.c:239
>> (MagickConstrainColormapIndex)
>> error: called from:
>> error: /usr/local/share/octave/3.6.1/m/image/imread.m at line 74, column 7
>
> The GraphicsMagick that Debian (and therefore Ubuntu sinde Ubuntu
> ports from Debian) use are compiled with quantum depth 8 so you can't
> use it to open images with more than 8bit per pixels. You'll have to
> recompile GraphicsMagick with Q=16 or 32, and then compile Octave
> again using that GraphicsMagick
>
> This is well know. You should ask the maintainers of the Debian and
> Ubuntu packages to do this. Please let them know that you are also
> interested on having this fixed at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557879
>
> Carnë
I have made this recently, so here's some instructinos how to do it.
You'll have to download GraphicsMagick source and when running
configure, use the following options
./configure --prefix=${HOME}/.usr --enable-shared --disable-static
--with-quantum-depth=16
I used quantum-depth 16 but you can use 32 as well if you think that
you'll need it. I have installed on my home directory so as to not
mess up other programs that require the Debian package version of the
library.
I have added the following to the ~/.profile file:
if [[ $LD_LIBRARY_PATH != *lib* ]]; then
export LD_LIBRARY_PATH="$HOME/usr/lib"
fi
if [[ -d "$HOME/bin" && $PATH != *$HOME/bin* ]]; then
export PATH="$HOME/bin:$HOME/usr/local/bin:$HOME/usr/bin:$PATH"
fi
if [[ -d "$HOME/usr/lib/pkgconfig" && $PKG_CONFIG_PATH !=
*$HOME/usr/lib/pkgconfig* ]]; then
export PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig"
fi
After this, the following commands should point to files in your home directory:
$ which GraphicsMagick++-config
$ pkg-config --cflags GraphicsMagick++
$ pkg-config --libs GraphicsMagick++
Carnë
- Loading and average PGM files, Mathieu, 2012/06/18
- Re: Loading and average PGM files, Laurent Hoeltgen, 2012/06/18
- Re: Loading and average PGM files, Mathieu, 2012/06/18
- Re: Loading and average PGM files, Jordi Gutiérrez Hermoso, 2012/06/18
- Re: Loading and average PGM files, Mathieu, 2012/06/18
- Re: Loading and average PGM files, Laurent Hoeltgen, 2012/06/18
- Re: Loading and average PGM files, Carnë Draug, 2012/06/18
- Re: Loading and average PGM files,
Carnë Draug <=
- Re: Loading and average PGM files, Mathieu, 2012/06/18
- Re: Loading and average PGM files, Carnë Draug, 2012/06/18
- Re: Loading and average PGM files, Mathieu, 2012/06/18
- Re: Loading and average PGM files, Jordi Gutiérrez Hermoso, 2012/06/18
- Re: Loading and average PGM files, Jordi Gutiérrez Hermoso, 2012/06/18
- Re: Loading and average PGM files, Sergei Steshenko, 2012/06/18
- Re: Loading and average PGM files, Jordi Gutiérrez Hermoso, 2012/06/18
- Re: Loading and average PGM files, Laurent Hoeltgen, 2012/06/18
- Re: Loading and average PGM files, Jordi Gutiérrez Hermoso, 2012/06/18
- Re: Loading and average PGM files, Mathieu, 2012/06/25