8x8 bitmaps contain 64 bits of data. You can store that in 8 bytes. I don't know where you get your 246 bytes from, GIF? JPG? If you want to store them in a format known by image viewers, I'd go for PBM, which, for 8x8 bitmaps, needs 7 additionaly bytes of overhead: the magic number (P4), and the width and height of the image, each encoded in ASCII. And each of the three pieces of data is followed by whitespace.
But you don't have to store them in a file system (many file systems will use 8k blocks, where each block can be used by at most two files, hence the 4096 bytes you mention. But some file system can subdivide blocks into smaller fragments, and allow you to use smaller blocks as well, but I disgress) - you can store them on a raw disk as well. Using a format (such as P4) that has a fixed size, finding them on a raw disk would be easy.
Of course, even if it was feasable, there's no point in generating and storing each possible image. You might as well generate the images when you need them.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|