1

Is it possible to access a histogram (as a tuple I'm thinking??) from within PythonMagick?

#!/usr/bin/env python
import PythonMagick

img = PythonMagick.Image("c:\\temp\\temp\\sample_image.jpg")

h = img.convert().histogram() # pseudo code for the following command line:
# convert sample_image.jpg -define histogram:unique-colors=true -format %c histogram:info:

It's much like this question, only I want to use the result within Python. I also don't want to have to rely on writing out the histogram as text file and the import it back in to Python with seems a little slow if not redundant.

Community
  • 1
  • 1
Mr Mystery Guest
  • 1,464
  • 1
  • 18
  • 47

0 Answers0