[GRASSLIST:3998] Re: importing GIFs?

Glynn Clements glynn.clements at virgin.net
Mon Jul 1 15:56:34 EDT 2002


Alex Thorn wrote:

> More questions from a newbie.
> I'm trying to import GIF files (or any image type
> really) into GRASS, and have been having troubles.
> 
> I'm not sure exactly what the problem I am
> experiencing is, whether it has to do with a bad
> install of GRASS 4.3, or that I am not using images in
> the correct format, or perhaps that I am not putting
> them in the correct location in the filesystem
> directory structure.
> 
> >From the UNIX commandline, I copied the image files
> into the PERMANENT directory for my current location
> (is this what it means when it says to put the files
> into the "working directory"?)

No; "working directory" means the same thing as "current directory". 
Do not attempt to modify GRASS database directories manually.

>, and then tried using
> r.in.gif.  Here's what it gave me:
> 
> GRASS:~ > r.in.gif -v input=ricepic1.gif
> output=ricepic1 title="Rice Cartoon 1"
> 1. GIF file not acceptable for conversion

AFAICT, there are only two ways this error can occur. One is if the
routine which reads a byte to fail before the header and palette have
been read; the other is if the first six bytes of the file aren't
"GIF87a".

> Incidentally, before I tried importing images as GIFs,
> I first tried with TIFFs, which gave the following
> error:
> GRASS:~ > r.in.tiff
> r.in.tiff: error while loading shared libraries:
> libjpeg.so.6: cannot open shared object file: No such
> file or directory

This is an OS problem. Your version of the TIFF library requires the
JPEG library, but the JPEG library either isn't installed, or isn't
installed correctly, or isn't the correct version.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list