I have an image that has a white background, a solid black company logo in the middle, and a medium-thick consistent width black border around the whole thing.
When I initiate auto-crop, select the border with the eyedropper as the background color, and set tolerance to 255, it does nothing.
If I set tolerance to any other value, even down to 1, it still does nothing.
If I set background color to white instead of black, it still does nothing, for tolerance =255 or =1 or anything in between.
Essentially autocrop does exactly *nothing* with any settings.
Should it not just very simply clip off the black borders and leave the logo on a white background in the middle of the image?
Cheers
TRJB
2.36: AutoCrop does not work
Moderators: XnTriq, helmut, xnview
-
- Posts: 4
- Joined: Tue Dec 27, 2011 8:16 pm
Re: AutoCrop does not work
Nevermind, I found that there was a 1 pixel grey border around the thick black border that couldn't be seen at normal zoom levels which was somehow stopping the routine from working.
I coarsely manually cropped to just within the thick black border, and then the autocrop routine worked fine with the background set to black.
Perhaps the routine could be made more robust and fail-safe by adding a parameter to help it detect something like this; IE, some additional tolerance setting to start looking for the "real" border to crop 2 or 3 pixels from the edge, and ignoring the phantom odd colored pixels right at the edge?
thanks
TRJB
I coarsely manually cropped to just within the thick black border, and then the autocrop routine worked fine with the background set to black.
Perhaps the routine could be made more robust and fail-safe by adding a parameter to help it detect something like this; IE, some additional tolerance setting to start looking for the "real" border to crop 2 or 3 pixels from the edge, and ignoring the phantom odd colored pixels right at the edge?
thanks
TRJB
-
- XnThusiast
- Posts: 3654
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: AutoCrop does not work
therealjoeblow wrote:Nevermind, I found that there was a 1 pixel grey border around the thick black border that couldn't be seen at normal zoom levels which was somehow stopping the routine from working.
I coarsely manually cropped to just within the thick black border, and then the autocrop routine worked fine with the background set to black.
Perhaps the routine could be made more robust and fail-safe by adding a parameter to help it detect something like this; IE, some additional tolerance setting to start looking for the "real" border to crop 2 or 3 pixels from the edge, and ignoring the phantom odd colored pixels right at the edge?
thanks
TRJB
Yes, ideally autocrop functions would have a 'sensitivity' setting to come c!oser to what the human brain can achieve in recognising the desired place to crop... But possibly a challenging algorithm to design?