2021年4月24日星期六

Pipe Image Stream into Identify Command

I'm trying to find the unique amount of colors in an image and I've come across ImageMagick's identify tool that is used at the command line.

identify -unique-colors sunset.png  

This has worked well in my tests, giving me much more accurate results compared to other tools.

My problem is the images I'd like to incorporate this into a script to examine images that aren't written to the hard drive. Is it possible to pipe a stream of data into the command? Something like:

echo xxx | identify -unique-colors  
https://stackoverflow.com/questions/67249388/pipe-image-stream-into-identify-command April 25, 2021 at 11:05AM

没有评论:

发表评论