pstoricohddst-gdi: Implement dot counts

The printers need the dotcounts per page to estimate toner use, so implement
this using the ImageMagick identify command.  One of the fx variables is the
mean, which is the average colour of the image.  For b/w images, this
represents the number of white pixels divided by size.  Thus the black dot
count is width*height*(1-mean).

Tidy up some of the repeated elements in the script so this calculation is
only in one place for ease of maintenance.

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 file changed