https://bugs.kde.org/show_bug.cgi?id=495632
--- Comment #2 from totte ---
(In reply to Nate Graham from comment #1)
> What scanning app were you using?
I haven't been able to reproduce this. I've been running `scanimage` like so:
```
#! /usr/bin/env python3
import os
import subprocess
import sys
from PIL import Image
# TODO: Check CLI args, default to not rotating
orientation = None
if len(sys.argv) > 1:
orientation = int(sys.argv[1])
save_path = "/home/totte/Pictures/Scans/"
counter = 1
filename_prefix = "{:02d}"
filename_suffix = ".tiff"
filename = filename_prefix + filename_suffix
while os.path.isfile(os.path.join(save_path, filename.format(counter))):
counter += 1
filename = filename.format(counter)
complete_path = os.path.join(save_path, filename)
# TODO: Replace with https://github.com/python-pillow/Sane
subprocess.run(
[
"scanimage",
"--format=tiff",
"--output-file",
complete_path,
"--progress",
"--mode",
"Gray",
"--resolution",
"600",
"-x",
"206",
"-y",
"292",
]
)
index = complete_path.find(".tiff")
jpg_complete_path = complete_path[:index] + ".jpg"
png_complete_path = complete_path[:index] + ".png"
scannedImage = Image.open(complete_path)
if orientation is not None:
rotatedImage = scannedImage.rotate(orientation, expand=1)
rotatedImage.save(complete_path)
resizedImage = rotatedImage.resize((1920, 1354), 1)
else:
resizedImage = scannedImage.resize((1354, 1920), 1)
resizedImage.save(png_complete_path, optimize=True)
```
Dolphin and Krita run all the time, if that could somehow be related to this. I
scan pencil sketches before and after inking them, and try to automate the
workflow using Python. I keep the original TIFFs and create smaller PNGs for
sharing. The file system is `btrfs`.
--
You are receiving this mail because:
You are watching all bug changes.