View Full Version : Compression Info (Formerly: Tips on Keeping Your Entry under 75kb in size.)

05-06-2008, 08:27 AM
Please post any tips on keeping low file sizes here.

One of the parameters in this month's competition is to keep entry file sizes under 75kb but with a resolution of at least 1280 x 1024 pixels in either jpg or png formats.

As our community are used to producing maps in the low megabyte file size range, this parameter is likely to present one of the most formidable challenges in the competition if, like me, you do not know much about file compression and the pros and cons of jpg v png.

If you are a file compression master, then please post your explanations and tips here for those of us who are technically less adept.

Redrobes and gameprinter have already given some invaluable advice as follows:


Solid blocks of color and PNG would probably win. The very worst thing for all images is random noise followed by thin lines ! If you have a door in an old school map then its better being solid rect than an open box for example. Also, lines that are horizontal and vertical will be much better than ones at an angle. With JPG its a bit more complicated knowing what shapes would compress better as all the compression isl done in frequency space. JPG will have about 16K minimum size even if its all white but PNG would be a few hundred bytes. Also, ensure you save your PNG with specific number of colors 1, 16, or full. If you have < 16 colors then don't save full color as its hugely more expensive.
no anti-alias, minimal colors, etc, is completely unnecessary to still create a map that falls under 75 KB and at 1280 x 1024 pixel JPG. The difference is maximum compression JPG file and the best compression method.
The antialiasing is only going to make minimal difference. With PNG it would add a little but with JPG anti aliasiing would likely drop the size a little !

05-06-2008, 08:59 AM
The rules recommend a scale of 5 - 10 pixels per foot as a useful scale.

This means that if you are using the minimum resolution of 1280 X 1024, you are looking at a map that is between 128 and 256 feet across by between 102 and 205 feet high.

A picture below shows relative scales.

05-06-2008, 09:03 AM
Thanx! That is the best bit of info I have seen so far!

05-06-2008, 01:42 PM
More tools for shrinking image files:

If you are using pngs, try:

followed by
http://en.wikipedia.org/wiki/AdvanceCOMP (the included advpng with the --shrink-insane option)

If jpg, try
http://en.wikipedia.org/wiki/Libjpeg jpegtran

-Rob A>

05-06-2008, 05:57 PM
a free image re sizer for Microsoft xp

direct link:

page it is found on is at:



05-06-2008, 06:41 PM
Once the May challenge is done, I think we should move this thread into the Software Discussion forum. There are already lots of good tips and utilities that it would be handy to have there. Or maybe it should just be appended to the end of the Image Export Formats thread.

05-07-2008, 05:06 AM
Some good advice from RobA:

The trick here is that jpg compression is designed for photos (or photorealistic images).

It is horrible for diagrams. You would probably get a better reproduction with a 2 bit gif on the diagram you posted.

-Rob A.

05-07-2008, 12:19 PM
Good article on minimising jpeg file sizes here (http://victor.transformadora.com/Oreilly/wdesign/wdesign/ch20_06.htm).

Good article on minimising png file sizes here (http://victor.transformadora.com/Oreilly/wdesign/wdesign/ch21_08.htm).

I've also just discovered that .jpg and .jpeg are the same (someone please correct me if I'm wrong!)

05-07-2008, 01:14 PM
You are correct. The shorter .jpg extension was made necessary because MS-DOS and early editions of Windows had a three-character limit on extensions. .tif and .tiff are also interchangeable for the same reason.

Since small file sizes in PNG depend on the number of colors used, those using that form of compression may want to review the color scheme generators linked here: http://www.cartographersguild.com/showthread.php?t=567

Reducing your image to a few colors can greatly improve compressibility, but it makes choosing the right colors more important. Those of us who are stronger technicians than artists can use some help with that.

05-07-2008, 05:18 PM
Good article on minimising jpeg file sizes here (http://victor.transformadora.com/Oreilly/wdesign/wdesign/ch20_06.htm).

Good article on minimising png file sizes here (http://victor.transformadora.com/Oreilly/wdesign/wdesign/ch21_08.htm).

I've also just discovered that .jpg and .jpeg are the same (someone please correct me if I'm wrong!)
Nice links except that as I read the first line it was wrong ! A JPEG is usually 24 bit but you can also do a greyscale JPG too. Thats a single channel version. That would sound like it would be 1/3 size but usually its nowhere near as small as that but it is smaller than a color one by maybe 20%.

05-07-2008, 05:28 PM
JPEG stands for Joint Photographic Experts Group - a sort of unofficial consortium when JPG was being developed. Since DOS based file suffixes have only 3 letters, thus JPG instead of JPEG. :D

05-12-2008, 06:37 PM
In in PhotoShop 7, I've found "Save for Web..." (to jpg) gives much better sizes than "Save as..." (to jpg). I'm sure there is a trade off but they look the same on my uncalibrated lcd monitor. :)

05-12-2008, 07:49 PM
The same holds true for PNG. You get a lot more controls to fine-tune your image, including specifying a palette and the degree of anti-aliasing that occurs. You also get instant feedback on how large the resulting file will be, so you can see exactly how much savings each option gives you.

05-13-2008, 08:11 AM
Hmm ... have to look at this, I might be able to get a 100px=5' image of the deck plan
(2500x2100 currently weighing in 88kb)

05-13-2008, 03:30 PM
I looked at your palette as soon as you posted it and its a 256 version and most of it is unused. I would think that you could do your pic in 16 col and go with a 4 bit PNG which would be a little less than your 8 bit version. If you made a custom palette of 8 shades of grey, two are three bright greens and that dark blue then you would probably have almost all of it done in about 12 out of the 16. Make sure that you go for nearest colour matching when transforming the palette tho. No dithering or half-toning or else it will shoot up the file size.

05-14-2008, 04:34 PM
OK, I must be a total idiot. I have made a pretty 'blah' map and it is coming in at just under 75k AFTER making big constraints (32 color etc), and I notice others have maps with way more detail than mine, and yet they have more detail. So what am I doing wrong?