Remove redundant code, fix trimmed sprite sheets

This code is duplicated in jsonLoader. Fixes trimmed sprite sheets as the duped code overwrites the correct trimmed handling.