commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Rahkonen (Jira)" <>
Subject [jira] [Commented] (IMAGING-267) Colorful rendering of b/w Monoband TIF
Date Tue, 22 Sep 2020 14:33:00 GMT


Jukka Rahkonen commented on IMAGING-267:

A few comments that hopefully clarify some points



The image is georeferenced, or perhaps better say oriented with the ESRI world file system [].
The .tfw sidecar file is telling the coordinates of the centre of the top left corner. Same
information seems to be copied into the  ModelTiepointTag but there are no other GeoTIFF
tags and normally .tfw file is used with a baseline TIFF without any GeoTIFF tags.


The coordinate system is unknown because .tfw does not report the coordinate system. The ESRI
way for presenting the CRS is to include another sidecar file .prj but this sample is missing
it. Thus the image should be considered to be in some engineering coordinate system, the
top-left being at coordinates 262846.525725 4464275.


Bit depth and histogram

Data type of the image 32 bit floating point but the data are in the low end of the full 32
bit range, between 514 and 2410. Because of this very many TIFF viewers would show this image
as totally black to bare eyes (black because of min-is-black metadata). Viewers which are
prepared to meet this kind of imagery are using the min/max data range and stretch this range
to 0-255 range for viewing. More clever clients are analyzing the histogram and stretch by
the 5 - 95% of the full range. Clients can either analyze the image (slow for big images)
or read the statistics from the normal tiff tags [] MinSampleValue
and MaxSampleValue if they are present. Geo viewers may support other ways, in this case by
reading the sidecar file .aux.xml

 <PAMRasterBand band="1">
 <MDI key="STATISTICS_MEAN">1410.9055247993</MDI>
 <MDI key="STATISTICS_STDDEV">427.16367167723</MDI>

Min-is-black question

The image is indeed min-is-black and the attached sextante.png is rendered as min-is-white.
Either that is a bug in sextante of perhaps sextante has an option for reversed colors.

> Colorful rendering of b/w Monoband TIF
> --------------------------------------
>                 Key: IMAGING-267
>                 URL:
>             Project: Commons Imaging
>          Issue Type: Bug
>            Reporter: edgar soldin
>            Priority: Major
>         Attachments: ISSUE_267.JPG, mdt25a-commons.png, mdt25a-sextante.png, mdt25a.tfw,
mdt25a.tif, mdt25a.tif.aux.xml
> see attached images.
> mdt25a.tif - the original tif
> mdt25a-commons.png - as rendered/read with Commons Imaging
> mdt25a-sextante.png - as rendered /read properly with ImageIO-Core from
> thanks!.. ede

This message was sent by Atlassian Jira

View raw message