Set correct static legend image height and width
Refactored resource retrieval for static legend images