Basic image manipulation
Different Python libraries can be used for basic image manipulation. Almost all the libraries store an image in a NumPy ndarray (2D array for grayscale, 3D array for RGB image, for example). As explained earlier, the following image shows the positive x and y directions (origin being the top-left corner of the image 2D array) for the colored Mona Lisa image:

Figure 1.33 – Image versus NumPy 2D array coordinates
Common image manipulation operations
Digital image manipulation involves modifying images to enhance appearance, change composition, or create visual effects. Common operations include cropping, resizing, rotating, color adjustment, sharpening, blurring, warping, and applying filter effects such as sepia or grayscale. More advanced manipulations include adding text, removing objects, cloning image regions, and merging multiple images into composite scenes. Many of these techniques will be implemented throughout this book using...