diff --git a/docs/handbook/cropped_hopper.jpg b/docs/handbook/cropped_hopper.jpg deleted file mode 100644 index 912d0a29c..000000000 Binary files a/docs/handbook/cropped_hopper.jpg and /dev/null differ diff --git a/docs/handbook/cropped_hopper.webp b/docs/handbook/cropped_hopper.webp new file mode 100644 index 000000000..8d0ae4f97 Binary files /dev/null and b/docs/handbook/cropped_hopper.webp differ diff --git a/docs/handbook/enhanced_hopper.jpg b/docs/handbook/enhanced_hopper.jpg deleted file mode 100644 index a87903eba..000000000 Binary files a/docs/handbook/enhanced_hopper.jpg and /dev/null differ diff --git a/docs/handbook/enhanced_hopper.webp b/docs/handbook/enhanced_hopper.webp new file mode 100644 index 000000000..a582ac0c2 Binary files /dev/null and b/docs/handbook/enhanced_hopper.webp differ diff --git a/docs/handbook/flip_left_right_hopper.jpg b/docs/handbook/flip_left_right_hopper.jpg deleted file mode 100644 index e1ef519e5..000000000 Binary files a/docs/handbook/flip_left_right_hopper.jpg and /dev/null differ diff --git a/docs/handbook/flip_left_right_hopper.webp b/docs/handbook/flip_left_right_hopper.webp new file mode 100644 index 000000000..59452268d Binary files /dev/null and b/docs/handbook/flip_left_right_hopper.webp differ diff --git a/docs/handbook/flip_top_bottom_hopper.jpg b/docs/handbook/flip_top_bottom_hopper.jpg deleted file mode 100644 index 03a5020f3..000000000 Binary files a/docs/handbook/flip_top_bottom_hopper.jpg and /dev/null differ diff --git a/docs/handbook/flip_top_bottom_hopper.webp b/docs/handbook/flip_top_bottom_hopper.webp new file mode 100644 index 000000000..28af4bf36 Binary files /dev/null and b/docs/handbook/flip_top_bottom_hopper.webp differ diff --git a/docs/handbook/masked_hopper.jpg b/docs/handbook/masked_hopper.jpg deleted file mode 100644 index f70a5ec47..000000000 Binary files a/docs/handbook/masked_hopper.jpg and /dev/null differ diff --git a/docs/handbook/masked_hopper.webp b/docs/handbook/masked_hopper.webp new file mode 100644 index 000000000..ef892cb94 Binary files /dev/null and b/docs/handbook/masked_hopper.webp differ diff --git a/docs/handbook/merged_hopper.png b/docs/handbook/merged_hopper.png deleted file mode 100644 index 662816cbd..000000000 Binary files a/docs/handbook/merged_hopper.png and /dev/null differ diff --git a/docs/handbook/merged_hopper.webp b/docs/handbook/merged_hopper.webp new file mode 100644 index 000000000..324628358 Binary files /dev/null and b/docs/handbook/merged_hopper.webp differ diff --git a/docs/handbook/pasted_hopper.jpg b/docs/handbook/pasted_hopper.jpg deleted file mode 100644 index 36e3492a4..000000000 Binary files a/docs/handbook/pasted_hopper.jpg and /dev/null differ diff --git a/docs/handbook/pasted_hopper.webp b/docs/handbook/pasted_hopper.webp new file mode 100644 index 000000000..90dc31994 Binary files /dev/null and b/docs/handbook/pasted_hopper.webp differ diff --git a/docs/handbook/rebanded_hopper.jpg b/docs/handbook/rebanded_hopper.jpg deleted file mode 100644 index 324f7ef14..000000000 Binary files a/docs/handbook/rebanded_hopper.jpg and /dev/null differ diff --git a/docs/handbook/rebanded_hopper.webp b/docs/handbook/rebanded_hopper.webp new file mode 100644 index 000000000..7a9069c9f Binary files /dev/null and b/docs/handbook/rebanded_hopper.webp differ diff --git a/docs/handbook/rolled_hopper.jpg b/docs/handbook/rolled_hopper.jpg deleted file mode 100644 index b2220f39c..000000000 Binary files a/docs/handbook/rolled_hopper.jpg and /dev/null differ diff --git a/docs/handbook/rolled_hopper.webp b/docs/handbook/rolled_hopper.webp new file mode 100644 index 000000000..7fe802463 Binary files /dev/null and b/docs/handbook/rolled_hopper.webp differ diff --git a/docs/handbook/rotated_hopper_180.jpg b/docs/handbook/rotated_hopper_180.jpg deleted file mode 100644 index cee897e95..000000000 Binary files a/docs/handbook/rotated_hopper_180.jpg and /dev/null differ diff --git a/docs/handbook/rotated_hopper_180.webp b/docs/handbook/rotated_hopper_180.webp new file mode 100644 index 000000000..08e14f0e3 Binary files /dev/null and b/docs/handbook/rotated_hopper_180.webp differ diff --git a/docs/handbook/rotated_hopper_270.jpg b/docs/handbook/rotated_hopper_270.jpg deleted file mode 100644 index e4d22be70..000000000 Binary files a/docs/handbook/rotated_hopper_270.jpg and /dev/null differ diff --git a/docs/handbook/rotated_hopper_270.webp b/docs/handbook/rotated_hopper_270.webp new file mode 100644 index 000000000..ead2e102e Binary files /dev/null and b/docs/handbook/rotated_hopper_270.webp differ diff --git a/docs/handbook/rotated_hopper_90.jpg b/docs/handbook/rotated_hopper_90.jpg deleted file mode 100644 index 763785c7a..000000000 Binary files a/docs/handbook/rotated_hopper_90.jpg and /dev/null differ diff --git a/docs/handbook/rotated_hopper_90.webp b/docs/handbook/rotated_hopper_90.webp new file mode 100644 index 000000000..9a5f70b20 Binary files /dev/null and b/docs/handbook/rotated_hopper_90.webp differ diff --git a/docs/handbook/show_hopper.png b/docs/handbook/show_hopper.png deleted file mode 100644 index 1f2e6f243..000000000 Binary files a/docs/handbook/show_hopper.png and /dev/null differ diff --git a/docs/handbook/show_hopper.webp b/docs/handbook/show_hopper.webp new file mode 100644 index 000000000..5cb73325b Binary files /dev/null and b/docs/handbook/show_hopper.webp differ diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst index e19da47a5..402f57f69 100644 --- a/docs/handbook/tutorial.rst +++ b/docs/handbook/tutorial.rst @@ -37,7 +37,7 @@ example, let’s display the image we just loaded:: >>> im.show() -.. image:: show_hopper.png +.. image:: show_hopper.webp :align: center .. note:: @@ -159,7 +159,7 @@ pixels, so the region in the above example is exactly 64x64 pixels. The region could now be processed in a certain manner and pasted back. -.. image:: cropped_hopper.jpg +.. image:: cropped_hopper.webp :align: center Processing a subrectangle, and pasting it back @@ -176,7 +176,7 @@ modes of the original image and the region do not need to match. If they don’t the region is automatically converted before being pasted (see the section on :ref:`color-transforms` below for details). -.. image:: pasted_hopper.jpg +.. image:: pasted_hopper.webp :align: center Here’s an additional example: @@ -201,7 +201,7 @@ Rolling an image return im -.. image:: rolled_hopper.jpg +.. image:: rolled_hopper.webp :align: center Or if you would like to merge two images into a wider image: @@ -221,7 +221,7 @@ Merging images return im -.. image:: merged_hopper.png +.. image:: merged_hopper.webp :align: center For more advanced tricks, the paste method can also take a transparency mask as @@ -250,7 +250,7 @@ Note that for a single-band image, :py:meth:`~PIL.Image.Image.split` returns the image itself. To work with individual color bands, you may want to convert the image to “RGB” first. -.. image:: rebanded_hopper.jpg +.. image:: rebanded_hopper.webp :align: center Geometrical transforms @@ -269,7 +269,7 @@ Simple geometry transforms out = im.resize((128, 128)) out = im.rotate(45) # degrees counter-clockwise -.. image:: rotated_hopper_90.jpg +.. image:: rotated_hopper_90.webp :align: center To rotate the image in 90 degree steps, you can either use the @@ -284,35 +284,35 @@ Transposing an image out = im.transpose(Image.Transpose.FLIP_LEFT_RIGHT) -.. image:: flip_left_right_hopper.jpg +.. image:: flip_left_right_hopper.webp :align: center :: out = im.transpose(Image.Transpose.FLIP_TOP_BOTTOM) -.. image:: flip_top_bottom_hopper.jpg +.. image:: flip_top_bottom_hopper.webp :align: center :: out = im.transpose(Image.Transpose.ROTATE_90) -.. image:: rotated_hopper_90.jpg +.. image:: rotated_hopper_90.webp :align: center :: out = im.transpose(Image.Transpose.ROTATE_180) -.. image:: rotated_hopper_180.jpg +.. image:: rotated_hopper_180.webp :align: center :: out = im.transpose(Image.Transpose.ROTATE_270) -.. image:: rotated_hopper_270.jpg +.. image:: rotated_hopper_270.webp :align: center ``transpose(ROTATE)`` operations can also be performed identically with @@ -396,7 +396,7 @@ Applying filters from PIL import ImageFilter out = im.filter(ImageFilter.DETAIL) -.. image:: enhanced_hopper.jpg +.. image:: enhanced_hopper.webp :align: center Point Operations @@ -448,7 +448,7 @@ Note the syntax used to create the mask:: imout = im.point(lambda i: expression and 255) -.. image:: masked_hopper.jpg +.. image:: masked_hopper.webp :align: center Python only evaluates the portion of a logical expression as is necessary to