Global Mapper v25.0

export single band geotiff with tranparency

turriper
turriper Global Mapper User
edited November 2014 in Technical Support
Hi all

I have a 3 colour + 1 alpha band geotiff from which I would like to export 1 colour band (the red) and the alpha band to a new geotiff.

I'm able to, with export raster > geotiff, export the desired colour band by selecting multiband (1, 2) and 8 bits per band and 1 band, with make background pixels transparent.

This loses the alpha channel / transparency I realised, because there's only one band, so I tried exporting with 2 bands, the first whose source was the red channel band 1 and the second whose source was the alpha, band 4 and the make background pixels transparent. This assigns the alpha band in original image to the blue band in the new image however, although intersetingly GIMP interprets the image as intended.


Could you help me work out how to achieve a single colour band + alpha export? I was concerned that the 8-bit palette option would result in loss of imagery data, but perhaps I'm wrong on this.

Thanks very much

Comments

  • turriper
    turriper Global Mapper User
    edited November 2014
    PS apologies for the probable confusion of terms

    Here's a screenshot of gimp with the exported image in question.

    gimp.png
  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    edited November 2014
    Hi turriper,

    OK, my understanding of GeoTIFF in't that deep, but 2-band images, while supported, aren't standard. Is that a requirement for your workflow?

    In any case, I did this in the raster calculator: I added formulas like this:



    Band

    Formula


    1
    B1


    2
    0


    3
    0


    4
    40000



    Made a new layer of bit-depth 16. The 40000 value is an alpha of ~60% (40000/65536). Then I exported this as Multi-band/16 bits/4 bands.

    Would that be more along the lines of what you're trying to do? Please let me know.

    Regards,

    ~Jeff
  • turriper
    turriper Global Mapper User
    edited November 2014
    Hi jeff

    Thanks I'll try out the raster calculator - I wasn't aware of this