Transform ImageMagick's convert command to RMagick

30 views Asked by At

I want to detect if an image is fully black. I use the following command:

convert /path/to/image.png -format "%[mean]" info:

it returns 0 if the image is fully black and non-zero value otherwise.

How can I rewrite it using RMagick gem?

0

There are 0 answers