The correct order is [Left, Right, Top, and Bottom]
This applies on both Sizing and Content. The sizing margins will enable the stretching/tiling of the image while retaining the aspect ratio of the corner and/or edges (as you mentioned)
The content margins will determine the position of the text/icons within the size of the image.