logoalt Hacker News

latexrtoday at 11:27 AM3 repliesview on HN

I’d be interested in trying this out as a command-line tool. It would be useful on its own and the fastest way to evaluate results.


Replies

jcynixtoday at 2:08 PM

ImageMagick is a wonderful command line tool, IMO. You could use it to extract various information, e.g. the 5 most used colors of an image, as in

    convert $IMG -colors 5 -depth 8 -format "%c" histogram:info: | sort -nr
If needed you can easily remove colored borders first (trim subcommand with fuzz option) or sample only xy% from the image's center, or where the main subject might be.
woodrowbarlowtoday at 12:09 PM

looks like it's a rust lib with a python wrapper. making a CLI tool should be just a few lines of code.

show 2 replies
dgroshevtoday at 2:56 PM

Good idea, I'll add a CLI tool over the weekend.