[Mapserver-users] help with ImageMagick & gdal utilities
Jan Hartmann
jhart at frw.uva.nl
Wed Mar 31 04:53:59 PST 2004
Benjamin Thelen wrote:
>
> I have 300 24bit tif images (6400x6400) which need to be resized and
> converted to 8bit.
>
> There are some problems and I suppose that most of you might have quite
> an experience with ImageMagick and the gdal utilities.
>
>
> Converting & resizing (convert / mogrify) with ImageMagick stops with
> "Memory allocation failed", allthough it is a machine with 512M of RAM,
> enough swap (1G) and enough /tmp (60G). Converting an image with a size
> up to 5400x5400 runs through (I resized one tif with IrfanView), but it
> takes incredible long, compared to gdal_translate or Windows IrfanView.
>
> Also all the tiff-headers (tags) are lost, see the tiffinfo output
> below. This is also true for both gdal utilies (gdal_translate and
> rgb2pct.py).
>
>
> I would be happy about some general feedback, experiences, tips and of
> course solutions :-)!
>
I have done this for lots of rasters up to 30000*30000 pixels with
GRASS. Resizing gets done line by line, so there is no limit to the size
of the raster. I think the same is true for converting to 8bits. For
operations that require the whole image in memory, like rectifying, you
can very easily split the image up, manipulate the parts, and stitch it
back together. IMHO for working with large rasters, nothing beats GRASS,
if only because it can be scripted so easily.
HTH,
Jan
More information about the MapServer-users
mailing list