Equally, there might be dozens, or even hundred of colors in the palette table, but they might all be set to either black or white.

Ah, yes! This program outputs such an image: a bmp image with lots of identical colors (white) in its palette. It also has unused colors that are neither black or white. (By the way, the image is also an executable perl script.)

print pack"V*",589712706,0,70647808,2621440,9437184,3604480,65536,8, 519045120,(309592064)x2,(16777216)x2,-65536,(-1)x95,65535,-65536, (-1)x30,571146239,1919957794,578055785,1953723722,1869504800, 1919248500,1919242272,1634213996,1919249251,577657900,1313169247, 174022468,-246,(-1)x115,65535,(0)x624,6316128,0,1616904192, 1610637408,24672,1616928864,96,1610612736,24672,1616928768,(0)x25, (1610612736)x2,0,24576,1616904192,0,24576,(0)x2,96,6291456,(0)x25, 6291456,0,96,24576,1610612736,0,24576,(0)x2,96,6291456,(0)x25, 6291456,0,96,24576,1610612736,0,24576,(0)x2,96,6291456,(0)x25, 6291456,0,96,1616904192,1616928864,0,1616928768,6316128,0,96, 6291456,(0)x27,96,0,1610612736,0,24576,1610612736,0,96,6291456, (0)x27,96,6291456,1610612736,0,24576,0,96,24672,6291456,(0)x27, 96,1610612736,6316128,0,24576,0,96,1616904288,24672,(0)x27,96,(0)x3, 24576,0,(96)x2,(0)x28,96,(0)x3,24576,1610612736,0,96,(0)x27, 1616928768,6316128,(0)x3,1616928864,6316128,0,96,(0)x34,1610612736, 96,(0)x951;

Alternately you could use a real compressor module:

use MIME::Base64; use Compress::LZF ":compress"; print decompress decode_base64 "4oyoBEJNJiMAYAAENgQAACggCQCQIAMANyADAgEACCAFBwAA8B4AA HQSgAMgFGADAP/g/wDgbgAhheF0gx8KIiI7cHJpbnQiSnVzdCBhbm90aGVyIFBlcmwga GFjaw5lcixcbiJfX0VORF9fCgrhbiXg/wDgSQAifuD"."/AOD"x8 ."/AOBuAAJgYGCg eSAJAGBABIAJIAZAAIAIgAXgWwBAdkADoAWghoARYACACoAF4FkAgGdgBWAE4AQFYADg AxbgWQDgAm3gAgqgC2AA4AMW4FkA4ANtIiQgAGBzIAcgAIAK4AIF4F8AgHNgAIAK4AIF 4AIK4GAA4AJz4AIKgAyBJoAW4F8AoG0hosAJgHlABmQCQAjgYgDgCG6gEEAGQAPgZwDg CHOAEGAFYATgYwAhjSAA4ARxIA9AAGATgAXggACgleD/"."AOD/"x13 .AOBfAAEAAA;

In reply to Re^2: check if image is monochromatic by ambrus
in thread check if image is monochromatic by frugofrog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.