Page 1 of 1

How do I auto-crop white pixel line borders of a picture?

Posted: 2008-03-16T00:30:52-07:00
by bensto
I want to pass a picture to ImageMagick and let the program auto-crop borders.
IM should anlyze from the borders (top,bottom,left,right) if athe last pixel line (row or column)
contains only white (or almost/close-to-white) pixels.
If so IM should remove this line (crop the picture).
This should be repeated until at least one -non-white pixel appears in the last pixel line.

How can I achieve this (with which options)?

Ben

Re: How do I auto-crop white pixel line borders of a picture?

Posted: 2008-03-16T02:07:27-07:00
by Bonzo

Re: How do I auto-crop white pixel line borders of a picture?

Posted: 2008-03-16T14:13:03-07:00
by fmw42
You can also try using my script autotrim. It uses a slightly different approach, but the end result is similar. You can get it at http://www.fmwconcepts.com/imagemagick/index.html

Re: How do I auto-crop white pixel line borders of a picture?

Posted: 2008-03-21T07:18:26-07:00
by bensto
fmw42 wrote:You can also try using my script autotrim. It uses a slightly different approach, but the end result is similar. You can get it at http://www.fmwconcepts.com/imagemagick/index.html
Sorry, could not download your script form page

http://www.fmwconcepts.com/imagemagick/ ... /index.php

Maybe the link is broken.

Could you verify this?

Ben

Re: How do I auto-crop white pixel line borders of a picture?

Posted: 2008-03-21T12:04:25-07:00
by fmw42
The link goes to a script that allows me to count downloads. So do not try to right click to get a menu to download. Simply left click the link and it should download automatically. Perhaps it is downloading but you do not know where your default download is going. Anyway, if that does not work, email me directly at fmw at alink.net and I will email you a copy directly. I have other reports that they could not download and I am not sure what the problem might be. So if you cannot get it to work and email me, please let me know what you are doing and on what platform and browser.

Fred