N
N
Nonprogrammer2016-03-22 17:07:20
Python
Nonprogrammer, 2016-03-22 17:07:20

How to use Wand-ImageMagick to check if an image is solid white or not?

All drawings are formulas written in black on a white background. But there are just white drawings, without a single black dot. How to use wand to check if a drawing is white or not? By the way, PIL is not suitable for me, since I still have to convert emf (wmf) to png, which PIL is not capable of, or am I mistaken?

with Image(blob=imgbytes) as img:
    #Тут надо проверить явяется img белым рисунком

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2016-04-08
@c_pro_lang

White is expressed in RGB hex as FFFFFF. It remains only in the loop to check if there is at least one non-white color.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question