1. A method comprising: identifying nodes corresponding to a layered feature in an image; determining convex hull coordinates of the nodes; and moving pixel columns of the image up or down until pixels corresponding to a reference line of the convex hull coordinates extend substantially horizontally for flattening the image.