Skip to main content

Add a couple of extra comments

ID
f9b6c1e
date
2024-03-28 07:09:59+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
79cf9d5
message
Add a couple of extra comments
changed files
1 file, 7 additions, 1 deletion

Changed files

images/srgbify.py (2255) → images/srgbify.py (2475)

diff --git a/images/srgbify.py b/images/srgbify.py
index 959a941..08f164c 100755
--- a/images/srgbify.py
+++ b/images/srgbify.py
@@ -6,7 +6,11 @@ This is particularly useful for screenshots on macOS, which are taken
 with the display's colour profile (e.g. Display LCD or Display P3), but
 which I want to convert to sRGB for converting on the web.
 
-This script strips out EXIF metadata.
+Note: this is a potentially destructive script.  Don't run this on images
+you care about if you don't have a backup!
+
+*   It overwrites the original image file.
+*   It strips out EXIF metadata.
 
 Based on https://github.com/python-pillow/Pillow/issues/1662
 """
@@ -39,6 +43,8 @@ def convert_image_to_srgb(im: Image) -> typing.Union[Image, None]:
     # To avoid any weird rotation issues, bake the rotation into the image.
     # See https://github.com/python-pillow/Pillow/issues/4703#issuecomment-645219973
     # or the associated test.
+    #
+    # See https://github.com/alexwlchan/scripts/issues/21
     im = ImageOps.exif_transpose(im)
 
     # Otherwise, convert the image to an sRGB colour profile and return that.