The IMGOP_INFO (5) opcode now returns the percent black for B&W TIF images. The calculation eliminates some noise (individual floating bits) and also ignores an outer margin equal to 1/40th of the width and/or length, and may be useful as a way of detecting blank (or perhaps too-light or too-dark) pages during scanning.
The updated layout for the IMGINFO parameter is:
MAP1 IMGINFO ! Image info packet
MAP2 IMG'OWIDTH,F ! Original image width (pixels)
MAP2 IMG'OLENGTH,F ! Original image length (pixels)
MAP2 IMG'DWIDTH,F ! Display width (pixels)
MAP2 IMG'DLENGTH,F ! Display length (pixels)
MAP2 IMG'BPP,F ! Bits per pixel
MAP2 IMG'NA,F ! not used
MAP2 IMG'TYPE,B,2 ! type: 1=tif,2=bmp,3=jpg,4=pcx,5=tga,6=gif,7=png
MAP2 IMG'BW'BLKPCT,F ! % black pixels (B&W TIF only)