Which extension is used for a graphics format that supports lossless compression and is widely used for web graphics?

Study for the CodeHS AP Computer Science Principles (CSP) Exam. Prepare with flashcards and multiple choice questions, each question comes with hints and explanations. Get ready for success!

Multiple Choice

Which extension is used for a graphics format that supports lossless compression and is widely used for web graphics?

Explanation:
Lossless compression means the image data can be reconstructed exactly from the compressed form, so nothing is lost in the process. PNG uses lossless compression (deflate), which preserves crisp edges and text—ideal for logos, icons, and graphics with sharp lines that appear on web pages. It also supports transparency through an alpha channel, letting images blend smoothly with varied backgrounds. That’s why .png is widely used for web graphics: you get clean visuals and flexible transparency without quality loss. By contrast, .gif is limited to a small color palette (256 colors) and is mainly used for simple graphics or animations; JPG uses lossy compression, which trades some data for smaller file sizes and can blur fine details, making it less suitable for images with sharp edges. ZIP isn’t an image format at all.

Lossless compression means the image data can be reconstructed exactly from the compressed form, so nothing is lost in the process. PNG uses lossless compression (deflate), which preserves crisp edges and text—ideal for logos, icons, and graphics with sharp lines that appear on web pages. It also supports transparency through an alpha channel, letting images blend smoothly with varied backgrounds.

That’s why .png is widely used for web graphics: you get clean visuals and flexible transparency without quality loss. By contrast, .gif is limited to a small color palette (256 colors) and is mainly used for simple graphics or animations; JPG uses lossy compression, which trades some data for smaller file sizes and can blur fine details, making it less suitable for images with sharp edges. ZIP isn’t an image format at all.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy