Scans: Auto-detect scanned pictures & trim white border #1394

Open
opened 2026-02-20 00:11:54 -05:00 by deekerman · 3 comments
Owner

Originally created by @Shadoweee77 on GitHub (Apr 10, 2022).

Problem:

When scanning images it's often that we get a white border around pictures - it would be nice for Photoprism to:

  • automatically tag scanned photos based on original title ( I for example set up "scannedimg_" prefix on my scanner)
  • automatically trim white area. Here is a stackoverflow post about it.

image

Originally created by @Shadoweee77 on GitHub (Apr 10, 2022). **Problem:** When scanning images it's often that we get a white border around pictures - it would be nice for Photoprism to: - automatically tag scanned photos based on original title ( I for example set up "scannedimg_" prefix on my scanner) - automatically trim white area. Here is a [stackoverflow post](https://stackoverflow.com/questions/44655961/autotrim-white-border-from-scanned-image-with-imagemagick) about it. ![image](https://user-images.githubusercontent.com/20088126/162635785-b6f25584-4bf2-4cda-941d-65dc4125ad26.png)
Author
Owner

@lastzero commented on GitHub (Apr 10, 2022):

Thank you! That seems like a good idea. Tagging based on certain attributes or keywords could be a quick win. I was hoping to find a matching exif tag, but have been unsuccessful so far.

It might be possible to identify scans based on the "Software" Exif tag value. Could you use exiftool to check the metadata for this and other tags that might be suitable for auto-tagging scans?

As a fallback solution, extracting/detecting keywords from the file name would be possible. However, that requires renaming and is not completely automatic.

@lastzero commented on GitHub (Apr 10, 2022): Thank you! That seems like a good idea. Tagging based on certain attributes or keywords could be a quick win. I was hoping to find a matching exif tag, but have been unsuccessful so far. It might be possible to identify scans based on the "Software" Exif tag value. Could you use exiftool to check the metadata for this and other tags that might be suitable for auto-tagging scans? As a fallback solution, extracting/detecting keywords from the file name would be possible. However, that requires renaming and is not completely automatic.
Author
Owner

@Shadoweee77 commented on GitHub (Apr 11, 2022):

This is exif.tools metadata if You mean that:
image

@Shadoweee77 commented on GitHub (Apr 11, 2022): This is exif.tools metadata if You mean that: ![image](https://user-images.githubusercontent.com/20088126/162722814-7c63b6c1-81e7-4aa2-96f8-a8c54d9a4ec5.png)
Author
Owner

@Shadoweee77 commented on GitHub (Apr 14, 2022):

Hey @lastzero - just did a few more scans and compared the EXIF data and can't find anything that is the same. Also I don't see a software tag. Sorry I couldn't help more.

@Shadoweee77 commented on GitHub (Apr 14, 2022): Hey @lastzero - just did a few more scans and compared the EXIF data and can't find anything that is the same. Also I don't see a software tag. Sorry I couldn't help more.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1394
No description provided.