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
How do I auto-crop white pixel line borders of a picture?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I auto-crop white pixel line borders of a picture?
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?
Sorry, could not download your script form pagefmw42 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
http://www.fmwconcepts.com/imagemagick/ ... /index.php
Maybe the link is broken.
Could you verify this?
Ben
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I auto-crop white pixel line borders of a picture?
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
Fred