texturepackerをご覧ください
http://www.texturepacker.com/
このようなファイルを出力します(事前設定に依存します)
{
"filename": "image_front_1",
"frame": {"x":1,"y":160,"w":34,"h":52},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":2,"w":36,"h":40},
"sourceSize": {"w":36,"h":40}
},
{
"filename": "image_front_2.png",
"frame": {"x":36,"y":160,"w":34,"h":52},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":42},
"sourceSize": {"w":36,"h":42}
},
{
"filename": "image_front_3.png",
"frame": {"x":71,"y":160,"w":34,"h":52},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":34,"h":52},
"sourceSize": {"w":36,"h":42}
},
{
"filename": "image_front_4.png",
"frame": {"x":106,"y":160,"w":34,"h":52},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":34,"h":52},
"sourceSize": {"w":36,"h":42}
}
このデータを使用すると、画像から簡単に別の長方形を取得できます。