imagemagick convert: limit trim to max X px
0
votes
2
answers
75
views
Using ImageMagick (6.9.11-60 on debian stable), I'd like to shave off 24px left and right of an scanned page (jpg or TIFF), but only if that area would actually be "empty" (i.e. mostly white).
I'd use
-shave
, but that removes pixels even if the area isn't white.
I then thought of -trim
but I lack the idea how to limit it to a max of 24px.
Question: How can I remove 24px left and right of a scanned image, but _only if the area is empty_?
I'm open to not using IM, it was just what first came to mind.
Asked by Jan
(7962 rep)
Jan 22, 2024, 09:54 AM
Last activity: Jun 5, 2024, 12:43 PM
Last activity: Jun 5, 2024, 12:43 PM