trim_polygon 1px edgecase
In very specific circumstances (1px only inside image bounds), the returned polygon is invalid :
>>> trim_polygon([[100, 100], [110, 100], [100, 100], [100, 110], [100, 100]], image_width=100, image_height=100)
[[100, 100], [100, 100]]
This case is unlikely to happen, but may be confusing, maybe it is possible to raise if the polygon is < 3points ?