Wednesday, 15 April 2015

Georeferencing PNG with transparency via gdal produce "green pixels" in QGIS?


This is just intriguing while not blocking my way, but I wonder what is going on and would like to get feedbacks from more experienced users.


1) Given a trans.png file (1.1MB) looks good and conserve transparencies (Stackexchanges displays below an altered version as .jpg) :


enter image description here


2) I restore georeferencing using :


gdal_translate -a_ullr 67.0 37.5 99.0 27.0 -co COMPRESS=LZW  -co ALPHA=YES       ./trans.png ./trans.gis.tif


3) The output trans.gis.tif (1.6MB) looks good and conserve transparencies (Stackexchanges displays below an altered version as .jpg):


enter image description here


4) Loading it in Quantum GIS, it get well positionned (georeferencing works!), but the image is ill colored with the darkest areas (and only them!) becoming green :


enter image description here


Is this green artifact normal ? How to fix it (so I may see the expected black pixels) ?




Edit: file added in 1)




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...