Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Reading this link searching a method to identify when my Production fail to generate a PDF file.
Think that counting how many WHITE there is i can easily identify bad file from good one.
convert bad.pdf -fuzz XX% -fill white -opaque white -fill black +opaque white -format "%%[fx:100*mean]" info:
This changes any color within XX% of white to white (-fuzz XX% -fill white -opaque white), then changes anything that is not white to black (-fill black +opaque white), then computes the mean value (in range 0 to 1) of the binary image and multiplies by 100 to get percent white.
I think that this question is rather more about DOS batch programming than about ImageMagick. So here is some batch sample code. For explanations see the link below. The code stores the mean value in an environment variable named WP, which may be evaluated by an IF statement. I kept the Convert statement rudimentary -- see the hints of the others in regard to it:
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
For %%i in (*.pdf) DO (
For /F %%a in ('convert %%i -resize 1x1 -format "%%[fx:100*mean]" info:') DO SET WP=%%a
IF !WP! GEQ 95 (
ECHO %%i = White
) ELSE (
ECHO %%i = Black
)
)