From bbc8180aa2b14ef9f0e11fa7feea5903c7b1998a Mon Sep 17 00:00:00 2001 From: MasterofJOKers Date: Fri, 31 May 2024 21:23:02 +0200 Subject: [PATCH] udev-device-plug-handler: Scan to PNG Instead of scanning to the default PNM format, we scan to PNG. PNM isn't that well-supported in normal image handling software. --- udev-device-plug-handler/udev-device-plug-handler | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev-device-plug-handler/udev-device-plug-handler b/udev-device-plug-handler/udev-device-plug-handler index 76eaf2e..2b9f00f 100644 --- a/udev-device-plug-handler/udev-device-plug-handler +++ b/udev-device-plug-handler/udev-device-plug-handler @@ -134,9 +134,10 @@ class CanonLIDE400(KnownDevice): '-y', '297mm', '--mode=Color', '--resolution', '300dpi', + '--format', 'png', '--button-controlled=yes', # '-p', # progress - f"--batch=scan_{now.strftime('%H%M%S')}_%04d.pnm" + f"--batch=scan_{now.strftime('%H%M%S')}_%04d.png" ] CanonLIDE400.__process = subprocess.Popen(cmd, stdout=subprocess.DEVNULL, cwd=directory) print("Handled Canon LiDE 400")