Artworks in PNG and JPEG format

March 16th, 2007 in Developer Diary · By Markus Weichselbaum

PNG is a very effective format for graphics, offering loss-less compression. It worked particularly well for the older type of mosaic artworks that were made out of unrotated and untextured tiles. However, it’s no good no more. What happened?

The new feature of tile rotation and in particular custom textures introduced a great amount of pixel-level detail, and so PNG is no longer a good choice. JPEG, a lossy-compression image format, is better suited for this type of material.

Our main goal was to have the actual artworks load as fast as possible, and so we needed to keep the file size down. JPEG is very well suited for the new type of rotated, textured tiles, but horrible for the old-style artworks. PNG is great for old-style artworks, but REALLY horrible for the new ones with tile rotation and textures.

Just how horrible is horrible? JPEG on old-style artworks typically doubles the file size. That’s bad. But PNG on new-style artworks increases the file size about 5-10 times! We’re talking 300-400 K here. This is quite unacceptable on anyone’s connection.

The only solution was to use whatever is producing the smaller file for each artwork. This happens auto-magically when you take a snapshot. It will actually save both the PNG and JPEG version, but the artwork page will display whatever image file has the smaller file size.

So if you ever feel that the JPEG compression produces too many artifacts and you’d like to see the artwork in its full and unadulterated glory, just manually change the file ending of the actual artwork image file to “.png”.

For example, the image file of Artwork 18152 is http://www.thebroth.com/gal/im18152.jpg - thus http://www.thebroth.com/gal/im18152.png is the PNG version of the image.

Share this:
  • del.icio.us
  • StumbleUpon
  • Furl
  • Netscape
  • Reddit
  • Technorati
  • YahooMyWeb

3 Responses to “Artworks in PNG and JPEG format”

Freaky Friday16 Mar 07

love the use of “auto-magically” there ;)

GO GO16 Mar 07

Aww i wanted to say that :P

xreko17 Mar 07

Awesome! It’s pretty cool how it picks the smaller sized image file. :)

Leave a comment