Internal TIFF mask behavior in uDig/qgis
|Reported by:||crschmidt||Owned by:||warmerdam|
Using an internal TIFF mask on a TIFF seems to have strange behavior in uDig: When opening the image with the mask, the mask seems 'reversed' -- the data that is supposed to be transparent (in my case, an edge) is displayed, and the center portion of the image is not.
With some tweaking of settings (changing the projection of the map) the result seems to be that the mask can be ignored, but I am unable to reproduce this in a way that I can share.
The way I produced the image was:
download http://gis2.amherstma.gov/massgis/sid_tiles_30cm/22829020.zip ./gdalmask/gdalmask -internal -nearblack -near 3 -nb 5 22829020_15.sid out.tiff (where gdalmask is winkey's tool from his sandbox)
This produces a mask with a 1px edge. To get a wider edge (more visible), you can:
gdalwarp -co TILED=YES -dstalpha -t_srs EPSG:4326 out.tiff warped_file.tif ./gdalmask/gdalmask -co TILED=YES -co COMPRESS=JPEG -nearblack -near 0 -internal warped_file.tif final_file.tif
This creates an image with several pixels of 'mask' on the outside, which then does not render properly in uDig if you add this image to a map.
Change History (16)
comment:3 by , 13 years ago
|Summary:||Internal TIFF mask behavior in uDig → Internal TIFF mask behavior in uDig/qgis|