Your white is not pure white, because JPG compression does not work well on large patches of solid color. This works for me with a larger fuzz value. IM 6.9.0.6 Q16 Mac OSX Snow Leopard
Code: Select all
convert test4.jpg -fuzz 30% -trim +repage resultimage
You need to add +repage, if you are going to use some other image format than jpg, such as png to remove the virtual canvas. It is not needed for jpg, but won't hurt to include it.
This was on your previous image. I am not sure why you just changed the example?
P.S. Typically you need to use -fuzz for trimming jpg images due to the compression changing values. Though I have not seen one that needed 30% before. It could be that there is some small gray spec on the border or interior to the white that requires a larger fuzz value to make it work past that region.