Aggressive Image size reduction via colour reduction

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?".
Post Reply
aigo
Posts: 29
Joined: 2017-06-26T12:02:47-07:00
Authentication code: 1151

Aggressive Image size reduction via colour reduction

Post by aigo »

Hi all,

I am a newbie to IM and trying to drastically reduce the size of images via colour reduction.

Is it possible to do a many to one mapping (replacement) of colours in IM using either an inbuilt or user-defined colour space?

Or is there a better way to do this (not colour reduction)?

I have tried some approaches but not getting any viable results, though I don't intend to preserve image quality at all, I just need an output that represents the original with the barest minimum.

Any suggestions will be highly appreciated.

my version of IM is 7.0.6_0 Q16 x86_64.

Thanks! :D
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Aggressive Image size reduction via colour reduction

Post by snibgo »

Yes, it's possible, eg with "-colors" or "-remap". See http://www.imagemagick.org/script/comma ... ptions.php

If you really don't care about quality, you can reduce the image to just two colours, black and white, which needs just 1 bit/pixel, and PNG compression may reduce it further.

For photos, jpeg does a good job of compression, eg 0.6 bits/pixel with acceptable quality, or more compression with less quality.

For graphics (eg solid colours), png is good. The program pngcrush searches for the best png parameters.
snibgo's IM pages: im.snibgo.com
Post Reply