Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Metroids
Posts: 2 Joined: 2013-07-05T14:11:01-07:00
Authentication code: 6789
Contact:
Post
by Metroids » 2013-07-05T14:17:30-07:00
I want something like this:
Code: Select all
convert input.png -dither Riemersma -remap palette.png -colors 15 output.png
(but I don't think that's a valid use of the library, pretty sure it's ignoring the colors param)
Input is an arbitrary image. Palette looks like this:
http://topolla.net/images/palette.png
A two step process like this works, but I don't think it chooses the best image.
Code: Select all
convert input.png -dither Riemersma -remap palette.png ouput.png
convert ouput.png -dither Riemersma -colors 15 ouput_final.png
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Contact:
Post
by snibgo » 2013-07-05T14:41:25-07:00
"-colors 15" chooses, from all possible colors, the 15 colors that best fit the image.
If you want to restrict the possible colors to those in palette.png, you could:
1. Remap to palette.png.
2. From the result, find the 15 most common colors.
3. Make a palette map of those 15 colors.
4. Remap input.png to the map from (3).
Metroids
Posts: 2 Joined: 2013-07-05T14:11:01-07:00
Authentication code: 6789
Contact:
Post
by Metroids » 2013-07-09T12:38:40-07:00
Thanks, I've gotten pretty good results from that process.
Users browsing this forum: Ahrefs [Bot] , Bing [Bot] , Google [Bot] and 1 guest