high_performance_images.pdf

(50207 KB) Pobierz
High
Performance
Images
SHRINK, LOAD, AND DELIVER IMAGES FOR SPEED
Colin Bendell, Tim Kadlec,
Yoav Weiss, Guy Podjarny,
Nick Doyle & Mike McCall
Shrink, Load, and Deliver Images for Speed
High Performance Images
Colin Bendell, Tim Kadlec, Yoav Weiss, Guy Podjarny,
Nick Doyle, and Mike McCall
Beijing
Boston Farnham Sebastopol
Tokyo
High Performance Images
by Colin Bendell, Tim Kadlec, Yoav Weiss, Guy Podjarny, Nick Doyle, and Mike McCall
Copyright © 2016 Akamai Technologies. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editor:
Brian Anderson
Production Editor:
Shiny Kalapurakkel
Copyeditor:
Rachel Monaghan
Proofreader:
Charles Roumeliotis
August 2016:
First Edition
Indexer:
Judy McConville
Interior Designer:
David Futato
Cover Designer:
Karen Montgomery
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2016-08-25:
2016-10-31:
First Release
Second Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491925805
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
High Performance Images,
the cover
image, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-92580-5
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1.
The Case for Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What About Mobile Apps?
Speed Matters
Do Images Impact the Speed of Websites?
Lingering Challenges
4
5
7
8
Part I.
Image Files and Formats
12
12
12
13
14
20
21
22
22
23
23
23
24
24
24
25
25
26
2.
The Theory Behind Digital Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Digital Image Basics
Sampling
Image Data Representation
Color Spaces
Additive Versus Substractive
Color Profiles
Alpha Channel
Frequency Domain
Image Formats
Why Image-Specific Compression?
Raster Versus Vector
Lossy Versus Lossless Formats
Lossy Versus Lossless Compression
Prediction
Entropy Encoding
Relationship with Video Formats
Comparing Images
PSNR and MSE
iii
Zgłoś jeśli naruszono regulamin