ignore null in GetHistogram, update to ticket 4750 for GDT_Byte case
|Reported by:||nflood||Owned by:||warmerdam|
Ticket http://trac.osgeo.org/gdal/ticket/4750 by gillins was a welcome fix in consistency between ComputeStatistics? and GetHistogram?. However, it missed a special case in GetHistogram?, for GDT_Byte datatype, when exactly 256 bins are used. This is, of course, a very common case, hence there is a special section of code for it, but the earlier patch missed this (quite understandably) and only fixed the more general case. Attached is a patch which brings the special case into line with the rest. This modification has been tested in gdal-1.10.1, and appears to behave, but the attached patch is against the current trunk (r26588). I have checked this modification with gillins, and he agrees.