[Ubuntu] imagemagick & gdal ?

Heikki Julkunen heikki.julkunen at gmail.com
Sat Apr 21 10:32:43 EDT 2012


First, thanks all for a great set of tools!

Anyway, I've seen this mentioned in a post elsewhere, but there was no reply.
I'm not sure who to 'blame', gdal or imagemagick, but it seems like the alpha channel 
embedded by imagemagick is NOT compatible with gdal. The transparency is NOT used.
(since imagemagick has no clue about geo-data after image processing I use geotifcp to add that). 

Example: gdalinfo bad-example.tif
<<geo meta removed>>
Band 1 Block=10020x1 Type=Byte, ColorInterp=Red
Band 2 Block=10020x1 Type=Byte, ColorInterp=Green
Band 3 Block=10020x1 Type=Byte, ColorInterp=Blue
Band 4 Block=10020x1 Type=Byte, ColorInterp=Undefined

A working file looks like this:
gdalinfo good-example.tif
<<geo meta removed>>
Band 1 Block=10020x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=10020x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=10020x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=10020x1 Type=Byte, ColorInterp=Alpha

I.e, it seems like the alpha from imagemagick is global but gdal expects a per dataset alpha ?




More information about the Ubuntu mailing list