Image Processing in Python - Using the Pillow library

Image Processing in Python

Processing raster images with the Pillow library
by Martin McBride

This book is for sale at http://leanpub.com/imageprocessinginpython
This version was published on 2021-08-22
Github: https://github.com/martinmcbride/python-imaging-book-examples

I Bitmap images

1. Introduction to bitmap imaging

1.1 What is a bitmap image?

You might be more familiar with alternative names - raster image, or pixel image. They mean the same thing as bitmap image. They are sometimes also called JPEG images or PNG images, named after specific image file formats.

You probably also know that a bitmap is made up of pixels - they can be thought of as tiny coloured squares that make up the image. They are normally too small to see but become visible if you zoom in too far and the image becomes pixelated.

1.2 Spatial sampling

  • A real-world scene has an almost infinite amount of detail.
  • A bitmap image has a finite amount of detail.
  • If the pixels are very small together, we can’t distinguish the individual, and the image looks similar to the actual scene.
  • In practical terms, at a viewing distance of 40 cm, the eye can resolve objects that are about 0.1 mm apart.
  • This means that if you wanted to print an image on a page so that the eye couldn’t see the individual pixels, you should aim for a pixel resolution of 10 pixels per mm (about 250 pixels per inch) or better.

1.3 Colour representation

1.4 File formats

1.5 Vector images

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容