Page 1 of 1
Count black and white pixels
Posted: Mon Oct 24, 2016 10:33 pm
by Nicholls physics
Is there a way to input a black and white PDF and, then, report the number of black and number of white pixels in each page of that PDF?
Thanks,
Chad
Re: Count black and white pixels
Posted: Tue Oct 25, 2016 6:05 pm
by cday
Nicholls physics wrote:Is there a way to input a black and white PDF and then report the number of black and number of white pixels in each page of that PDF?
Thanks, Chad
Depending on exactly what you wish to do, you might find this post
How to calculate the number of pixels ("Black factor") of interest.
GFL SDK is XnView software and there is a forum section for it, although I know little about it and believe that it is no longer actively supported.
The
ImageJ utility is also mentioned, and the Wikipedia page for that lists some other utilities that might possibly be of interest.
XnView software including the command line utility NConvert can extract images from a multipage PDF file if required; it uses the open source utility Ghostscript to rasterise the images in the PDF file, and the DPI value used will determine the pixel dimensions of the extracted images and hence the absolute number of pixels in the image, if that is a relevant consideration.