Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Map output - compression/size help  (Read 1080 times)

ducker

  • Bay Watcher
    • View Profile
Map output - compression/size help
« on: September 19, 2006, 09:10:00 am »

I love uploading my maps to shair with friends and get ideas from people more experienced, but as my fortress is increasing in size, it's more and more difficult for me to make it a small/managable download.

What tools do people use to modify/compress the file so that it is a resonable size?  Before I would convert it to a .jpg which dropped it to about 5meg, and then I would cut/paste just my base... but that's not nearly doable now that my base is quite a bit larger.

Any suggestions would be appreciated, as it is right now I'm just shrinking the image in ms paint which brings it down to about 2meg.

Thanks!

Logged

rawr

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #1 on: September 19, 2006, 09:35:00 am »

save it as an png  :) ..

I personally use irfranview for editing the image as mspaint kinda sucks for that large images imo.

Logged

ducker

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #2 on: September 19, 2006, 09:53:00 am »

ok.. I guess I'll check out that graphics program you use.  I opened up the .jpg file I had (the one that's 2meg) and saved it as a .png  it blew up to 8meg! (using ms paint... downloading that app you suggested now)


hm

[ September 19, 2006: Message edited by: ducker ]

Logged

ducker

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #3 on: September 19, 2006, 10:03:00 am »

tried Irfranview 3.98.  works nicely for converting images and such, but converting to a .png blows up the file to over 12meg, that's at the highest compression.

hm. . .

Logged

ducker

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #4 on: September 19, 2006, 10:22:00 am »

ok... if I use that applicaiton to zoom out, crop only my fortress out, and then save it as a .jpg and compress the hell out of it I get the following:
Link to my fortress

That will work I guess... about 887kb

Logged

Zurai

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #5 on: September 19, 2006, 09:56:00 pm »

quote:
Originally posted by ducker:
<STRONG>tried Irfranview 3.98.  works nicely for converting images and such, but converting to a .png blows up the file to over 12meg, that's at the highest compression.

hm. . .</STRONG>


Uhhh.... considering the local maps start out at ~150MB for a fortress up to the lava, 12 MB is an over 90% compression rate  ;)

Logged

syllogism

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #6 on: September 20, 2006, 06:47:00 am »

Even with paint and no cropping you can drop the size to ~600kb by saving it as a 16 color bitmap (still looks good)and then png.
Logged

Gronut

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #7 on: September 20, 2006, 10:08:00 pm »

IMHO indexed colour is the way to go, so gifs and pngs. Anything with lossy compression like a jpeg is gonna be wasted on images like DF maps that are all solid colours and sharp edges, resulting in crappy compression and terrible image quality. You can get a 30mb bitmap of your DF fortress down to about 400k in a gif.
Logged

Klyith

  • Escaped Lunatic
    • View Profile
Re: Map output - compression/size help
« Reply #8 on: September 21, 2006, 08:09:00 am »

Step one: convert to PNG. Use IfranView, XnView, or a real graphics editing program.

Step two: Use OptiPNG, a lossless PNG compressor / optimizer, on the file to shrink it further. I get about 50% extra compression with "optipng.exe -o5 file.png". You can go to -o7 for even more number crunching to look for possibly better compression, but -o5 takes a couple minutes on a big map image already. It's also one of those diminishing return things, the first 50% of the work gets 95% of the result.

I get smaller png files with this method than all but the most low quality jpgs, and they look a ton better. The amount of repetition in DF screenshots means they compress very well in lossless formats.

Logged

ducker

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #9 on: September 21, 2006, 10:00:00 am »

spiff, I'll try it out tonight - thanks.
Logged

Romalar

  • Escaped Lunatic
    • View Profile
Re: Map output - compression/size help
« Reply #10 on: September 21, 2006, 03:36:00 pm »

BTW, if you save first as a JPG and then as a PNG (as someone mentioned near the top), you will definitely get poor quality and a larger size.  The JPG compression has already sort of ruined the image.  Always go from the original to the PNG.
Logged

ducker

  • Bay Watcher
    • View Profile
Re: Map output - compression/size help
« Reply #11 on: September 21, 2006, 03:40:00 pm »

yep that was what I was initially attempting to do (I didn't have the original file with me at work)

Thanks again all.

Logged

Romalar

  • Escaped Lunatic
    • View Profile
Re: Map output - compression/size help
« Reply #12 on: September 21, 2006, 04:27:00 pm »

Many of you are running the game with the 800x600 characters at a higher resolution than 640x300, right?  If you want to really shrink your files without losing quality, switch back temporarily.  The bitmap is saved with your current resolution, and that will make the files a lot smaller.

Also, the image editor GIMP (free at http://www.gimp.org/)  works well for this.  With my resolution and font set to 640x300, and a large base, I can just save a PNG from GIMP and it's 745kB.  If I convert it to 32-color (you don't lose any colors that way), it saves the PNG at 497kB.

To convert to 32-color in GIMP:

1. Open the file
2. Go to Image->Mode->Indexed
3. Choose Generate Optimum Palette (should be the default)
4. Change to 32 colors maximum
5. Change Color Dithering to None
6. OK, wait, and Save to a .png

[ September 21, 2006: Message edited by: Romalar ]

[ September 21, 2006: Message edited by: Romalar ]

Logged