Hi, like this?
Search found 4 matches
- 2017-06-04T19:09:29-07:00
- Forum: Users
- Topic: Counting the number of pixels of a particular color
- Replies: 10
- Views: 6875
- 2017-06-01T02:46:17-07:00
- Forum: Users
- Topic: Counting the number of pixels of a particular color
- Replies: 10
- Views: 6875
Re: Counting the number of pixels of a particular color
The syntax above is bash. For Windows BAT: convert tree.gif ^ -fill black +opaque yellow ^ -fill white -opaque yellow ^ -format "yellow sun pixels = %%[fx:int(w*h*mean+0.5)]" info: If using v7, use "magick" instead of "convert". Instead of "yellow", put "red" or "#f00" or "rgb(255,0,0)" or whatever ...
- 2017-05-31T15:22:40-07:00
- Forum: Users
- Topic: Counting the number of pixels of a particular color
- Replies: 10
- Views: 6875
Re: Counting the number of pixels of a particular color
To count the number of Yellow pixels, I would use this: convert tree.gif -fill black +opaque yellow \ -fill white -opaque yellow \ -format "yellow sun pixels = %[fx:int(w*h*mean+0.5)]" info: This is the same as 7 years ago, but explicitly rounded to the nearest integer. Thanks a lot for the help ...
- 2017-05-31T14:56:20-07:00
- Forum: Users
- Topic: Counting the number of pixels of a particular color
- Replies: 10
- Views: 6875
Counting the number of pixels of a particular color
Hi, I'm completely new to IM, in fact I downloaded it today. I found an answer for this exact question from 7 years ago. Here are the answers: https://www.imagemagick.org/discourse-server/viewtopic.php?t=16177 My question would be, with the current version of IM, are those answers still the rule of ...