{"action":"closed","issue":{"url":"https://api.github.com/repos/andybalaam/rabbit-escape/issues/348","repository_url":"https://api.github.com/repos/andybalaam/rabbit-escape","labels_url":"https://api.github.com/repos/andybalaam/rabbit-escape/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/andybalaam/rabbit-escape/issues/348/comments","events_url":"https://api.github.com/repos/andybalaam/rabbit-escape/issues/348/events","html_url":"https://github.com/andybalaam/rabbit-escape/issues/348","id":135203961,"number":348,"title":"auto-crop images","user":{"login":"colonelfazackerley","id":9596719,"avatar_url":"https://avatars.githubusercontent.com/u/9596719?v=3","gravatar_id":"","url":"https://api.github.com/users/colonelfazackerley","html_url":"https://github.com/colonelfazackerley","followers_url":"https://api.github.com/users/colonelfazackerley/followers","following_url":"https://api.github.com/users/colonelfazackerley/following{/other_user}","gists_url":"https://api.github.com/users/colonelfazackerley/gists{/gist_id}","starred_url":"https://api.github.com/users/colonelfazackerley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colonelfazackerley/subscriptions","organizations_url":"https://api.github.com/users/colonelfazackerley/orgs","repos_url":"https://api.github.com/users/colonelfazackerley/repos","events_url":"https://api.github.com/users/colonelfazackerley/events{/privacy}","received_events_url":"https://api.github.com/users/colonelfazackerley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-21T13:09:32Z","updated_at":"2016-03-02T19:03:08Z","closed_at":"2016-03-02T19:03:08Z","body":"Lots of the images have large regions of nothing but transparency. I dont think this makes the pngs bigger, as it compresses well. Would I be correct in thinking that cropping these would decrease\r\n memory usage, as the game caches them uncompressed?\r\n\r\n- analyse each image (probably easier when rendered to png) and figure out what can be cropped\r\n- removing bits from the right and bottom is easier\r\n- find all rea where the image is used\r\n- crop the top and right\r\n- adjust the offset values in the rea to compensate\r\n\r\nI think I could do this. The bit I am least sure of is programmatically cropping the svg files. "}}