Added automatic size detection of legend image if no size parameter is set while retrieving the legend image from the server layer #184