don’t convert to sRGB if we don’t have any colour profile
- ID
6cdfcbe- date
2023-07-28 04:56:40+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
5a6fa81- message
don't convert to sRGB if we don't have any colour profile- changed files
1 file, 10 additions, 9 deletions
Changed files
images/kn_cover_image (5191) → images/kn_cover_image (5274)
diff --git a/images/kn_cover_image b/images/kn_cover_image
index 31d376e..937a4e4 100755
--- a/images/kn_cover_image
+++ b/images/kn_cover_image
@@ -165,15 +165,16 @@ if __name__ == "__main__":
cropped_im.save(out_path, icc_profile=im.info.get("icc_profile"))
- subprocess.check_call(
- [
- "retrobatch",
- "--workflow",
- "~/repos/scripts/images/overwrite_with_srgb.retrobatch",
- out_path,
- ],
- stdout=subprocess.DEVNULL,
- )
+ if im.info.get("icc_profile") is not None:
+ subprocess.check_call(
+ [
+ "retrobatch",
+ "--workflow",
+ "~/repos/scripts/images/overwrite_with_srgb.retrobatch",
+ out_path,
+ ],
+ stdout=subprocess.DEVNULL,
+ )
print(out_path)
assert cropped_im.width == cropped_im.height * 2