The program below will get you started. It generates all 8x8 images using just black and white pixels, storing them in PBM format, requiring only 15 bytes per file.

Without counting overhead of inodes and directories, you only need to solve the *minor* *minor* *minor* storage issue of 257,698,037,760 Tb.

On my computer, it took more than an hour to generate all 3x8 bitmaps. Rounding that down to an hour, an estimate to do all 8x8 bitmaps is 125 million years.

That's 125 million years for an image consisting of a mere 64 bits. A 480x640 bitmap contains 307200 bits, the full colour version 7372800 bits. Realizing that a single bit more means doubling of your computer time you must come to the conclusion your quest is unfeasable.

Really, it's cheaper to just subscribe to the porn sites instead of generating your smut images this way.

Here's the code:

#!/usr/bin/perl use strict; use warnings; my $dir = "/tmp"; foreach my $r1 (0x00 .. 0xFF) { my $d1 = sprintf "$dir/%02X", $r1; mkdir $d1 or die "mkdir $d1: $!\n"; foreach my $r2 (0x00 .. 0xFF) { my $d2 = sprintf "$d1/%02X", $r2; mkdir $d2 or die "mkdir $d2: $!\n"; foreach my $r3 (0x00 .. 0xFF) { my $d3 = sprintf "$d2/%02X", $r3; mkdir $d3 or die "mkdir $d3: $!\n"; foreach my $r4 (0x00 .. 0xFF) { my $d4 = sprintf "$d3/%02X", $r4; mkdir $d4 or die "mkdir $d4: $!\n"; foreach my $r5 (0x00 .. 0xFF) { my $d5 = sprintf "$d4/%02X", $r5; mkdir $d5 or die "mkdir $d5: $!\n"; foreach my $r6 (0x00 .. 0xFF) { my $d6 = sprintf "$d5/%02X", $r6; mkdir $d6 or die "mkdir $d6: $!\n"; foreach my $r7 (0x00 .. 0xFF) { my $d7 = sprintf "$d6/%02X", $r7; mkdir $d7 or die "mkdir $d7: $!\n"; foreach my $r8 (0x00 .. 0xFF) { my $f8 = sprintf "$d7/%02X", $r8; open my $fh, ">", $f8 or die "open $f8: $!\n"; printf $fh "%s\n%d %d\n", "P4", 8, 8; print $fh pack "C8", $r1, $r2, $r3, $r4, $r5, $r6, $r +7, $r8; close $fh or die "close $f8: $!\n"; } } } } } } } } __END__

In reply to Re^7: Very Large Hex Combinations by Anonymous Monk
in thread Very Large Hex Combinations by danambroseUK

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.