User:Brandished/Sandbox 3

From Valve Developer Community
Jump to: navigation, search

Choosing the proper image format for your article. JPEG, PNG, or GIF?

Basic-text, minimal color images

Original Size


JPEG

Ref output pic.jpg

PNG

Ref output pic.png

GIF

Ref output pic.gif


Thumbnail size (200px)


JPEG

Ref output pic.jpg

PNG

Ref output pic.png

GIF

Ref output pic.gif


Comparison Chart


Resolution Format File Size Problems
Original Size JPEG 84 KB Minor color run, larger file size
Original Size PNG 27.7 KB None
Original Size GIF 18.7 KB None
Thumbnail JPEG 13.3 KB None
Thumbnail PNG 25 KB Almost no change in file size
Thumbnail GIF 5.8 KB Over-sharpened


In-game, full color images

Original size


JPEG

Ref ingame pic.jpg

PNG

Ref ingame pic.png

GIF

Ref ingame pic.gif


Thumbnail size (200px)


JPEG

Ref ingame pic.jpg

PNG

Ref ingame pic.png

GIF

Ref ingame pic.gif


Comparison Chart


Resolution Format File Size Problems
Original Size JPEG 120 KB Minor color loss
Original Size PNG 602 KB Large file size
Original Size GIF 160 KB Noticeable pixelation
Thumbnail JPEG 17.2 KB None
Thumbnail PNG 66 KB Large file size
Thumbnail GIF 24.2 KB Heavy color distortion, Over-sharpened


Conclusion

For basic images that use a minimal color palette

A good choice is either PNG or GIF (assuming you aren't planning on thumbnailing the image), going with JPEG can increase the file size by 300 to 400 percent and may sometimes add color run, especially where there is a sharp transition between colors, usually found around text and drawn lines.

For complex images that use a full color palette

JPEG is the best bet if you tolerate the almost unnoticeable detail-loss. While the PNG format will have the best quality, it also has a file size roughly 500 percent larger then JPEG. For GIF's, you would be better off shrinking files using 3rd party software and uploading the resized image to the VDC rather then using the Wiki's built in thumbnailing option (eg: file:filename.gif|200px) on the full size image.

Note

To save screenshots in the JPEG format, type this into the console:

bind f5 jpeg

To go back to saving screenshots in the TGA format, type this into the console:

bind f5 screenshot

See also

External Links