Further to my question on SO I'm trying to check the validity of bitmaps. Mainly for transparent or black pixels.
I'm new to ArcMap, and I now know that Python scripts can be run from Arc.
Any hoops, the following script loops over the bitmap pixel by pixel using Pillow.
# get image (theFile) & threshold (th)
f = theFile
img = Image.open(theFile)
w = img.size[0]
h = img.size[1]
pix = img.load()
blackCount = 0
for y in range(h):
for x in range(w):
p = pix[x,y]
r,g,b, a = p
print ("r, g, b: %s, %s, %s" % (r, g, b))
if (r <= th) & (g <= th) & (b <= th):
blackCount +=1
However, I realised that Pillow can't handle large bitmap files (I'm looking at images in excess of 2GB)
What's the best way to achieve this through ArcMap?
Bearing in mind I need to look over hundreds of directories containing each tiff. The results just need to be in the form of a text file - damage to each bitmap(s) (number of pixels effected) and the name of the file(s) in question.