Return count of each color.
(self, colors=0, clip=None)
| 13573 | JM_clear_pixmap_rect_with_value(self.this, value, JM_irect_from_py(bbox)) |
| 13574 | |
| 13575 | def color_count(self, colors=0, clip=None): |
| 13576 | ''' |
| 13577 | Return count of each color. |
| 13578 | ''' |
| 13579 | pm = self.this |
| 13580 | rc = JM_color_count( pm, clip) |
| 13581 | if not colors: |
| 13582 | return len( rc) |
| 13583 | return rc |
| 13584 | |
| 13585 | def color_topusage(self, clip=None): |
| 13586 | """Return most frequent color and its usage ratio.""" |