Preface
- Who is this book for?
- About the author
- Keep in touch
Introduction
- Versions
- Example sources on github
- IBitmap images
1Introduction to bitmap imaging
- 1.1What is a bitmap image?
- 1.2Spatial sampling
- 1.3Colour representation
- 1.4File formats
- 1.5Vector images
2Computer colour
- 2.1Visible light
- 2.1.1Frequency and wavelength
- 2.2What is colour?
- 2.2.1Non-spectral colours
- 2.3How we see colour
- 2.4The RGB colour model
- 2.4.1Displaying colour
- 2.4.2Representing RGB colours as a percentage
- 2.4.3Floating point representation
- 2.4.4Byte value representation
- 2.5Colour resolution
- 2.6Greyscale colour model
- 2.7The CMYK colour model
- 2.7.1The K component
- 2.8HSL/HSB colour models
- 2.9HSL variants
- 2.10Perceptual colour models
- 2.10.1CIE spaces
- 2.11Colour management
- 2.11.1Gamuts
3Bitmap image data
- 3.1Data layout
- 3.28-bit per channel images
- 3.2.124-bit RGB
- 3.2.232-bit CMYK
- 3.2.38-bit greyscale
- 3.2.432-bit RGBA
- 3.3Bitmap data with fewer levels
- 3.3.18-bit RGB
- 3.3.216-bit RGB
- 3.3.3Dithering
- 3.4Bilevel images
- 3.5Bitmap data with more levels
- 3.6Palette based images
- 3.6.1Images with more than 256 colours
- 3.7Handling transparency
- 3.7.1Alpha channel
- 3.7.2Transparent palette entry
- 3.7.3Transparent colour
- 3.8Interlacing and alternate pixel ordering
4Image file formats
- 4.1Why are there so many formats?
- 4.2Image data and metadata
- 4.3Image compression
- 4.3.1Lossless compression
- 4.3.2Lossy compression
- 4.4Some common file formats
- 4.4.1PNG format
- 4.4.2JPEG format
- 4.4.3GIF format
- 4.4.4BMP format
- 4.5Animation
- IIPillow library
5Introduction to Pillow
- 5.1Pillow and PIL
- 5.2Installing Pillow
- 5.3Main features of Pillow
6Basic imaging
- 6.1The Image class
- 6.2Creating and displaying an image
- 6.3Saving an image
- 6.4Handling colours
- 6.4.1Converting strings to colours
- 6.5Creating images
- 6.6Opening an image
- 6.7Image processing
- 6.8Rotating an image
- 6.9Creating a thumbnail
- 6.10Image modes
7Image class
- 7.1Example code
- 7.2Creating images
- 7.2.1Image.new
- 7.2.2Image.open
- 7.2.3copy
- 7.2.4Other methods
- 7.3Saving images
- 7.4Image generators
- 7.5Working with image bands
- 7.5.1getbands
- 7.5.2split
- 7.5.3merge
- 7.5.4getchannel
- 7.5.5putalpha
8ImageOps module
- 8.1Image resizing functions
- 8.1.1expand
- 8.1.2crop
- 8.1.3scale
- 8.1.4pad
- 8.1.5fit
- 8.2Image transformation functions
- 8.2.1flip
- 8.2.2mirror
- 8.2.3exif-transpose
- 8.3Colour effects
- 8.3.1grayscale
- 8.3.2colorize
- 8.3.3invert
- 8.3.4posterize
- 8.3.5solarize
- 8.4Image adjustment
- 8.4.1autocontrast
- 8.4.2equalize
- 8.5Deforming images
- 8.5.1How deform works
- 8.5.2getmesh
- 8.5.3A wave transform
- 8.5.4Other deformations
9Image attributes and statistics
- 9.1Attributes
- 9.1.1File size
- 9.1.2File name
- 9.1.3File format
- 9.1.4Mode and bands
- 9.1.5Palette
- 9.1.6Info
- 9.1.7Animation
- 9.1.8EXIF tags
- 9.2Image statistics
- 9.2.1Image histogram
- 9.2.2Masking
- 9.2.3Other Image statistics
- 9.2.4ImageStat module
10Enhancing and filtering images
- 10.1ImageEnhance
- 10.1.1Brightness
- 10.1.2Contrast
- 10.1.3Color
- 10.1.4Sharpness
- 10.2ImageFilter
- 10.3Predefined filters
- 10.4Parameterised filters
- 10.4.1Blurring functions
- 10.4.2Unsharp masking
- 10.4.3Ranking and averaging filters
- 10.5Defining your own filters
11Image compositing
- 11.1Simple blending
- 11.1.1Image transparency
- 11.1.2ImageChops blend function
- 11.1.3ImageChops composite function
- 11.2Blend modes
- 11.2.1Addition
- 11.2.2Subtraction
- 11.2.3Lighter and darker
- 11.2.4Multiply and screen
- 11.2.5Other blend modes
- 11.3Logical combinations
12Drawing on images
- 12.1Coordinate system
- 12.2Drawing shapes
- 12.2.1Drawing rectangles
- 12.2.2Drawing other shapes
- 12.2.3Points
- 12.3Handling text
- 12.3.1Drawing simple text
- 12.3.2Font and text metrics
- 12.3.3Anchoring
- 12.3.4Drawing multiline text
- 12.4Paths
- 12.4.1Drawing a path
- 12.4.2Transforming paths
- 12.4.3Mapping points
13Accessing pixel data
- 13.1Processing an image
- 13.2Creating an image
- 13.3Performance
14Integrating Pillow with other libraries
- 14.1NumPy integration
- 14.1.1Converting a Pillow image to Numpy
- 14.1.2Image data in a NumPy array
- 14.1.3Modifying the NumPy image
- 14.1.4Converting a NumPy array to a Pillow image
- IIIReference
15Pillow colour representation
- 15.1Hexadecimal colour specifiers
- 15.2RGB functions
- 15.3HSL functions
- 15.4HSV functions
- 15.5Named colours
- 15.6Example
- 15.7Image modes
More books from this author
- Numpy Recipes
- Computer Graphics in Python with Pycairo
- Functional Programming in Python