Weather Condition Image is distorted, pixelated and background isn't fully transparent

  • 1
  • Problem
  • Updated 2 years ago
When making an api call using Javascript I'm trying to grab the current weather condition image, which goes as planned. Then I set it to the icon set that I want, the url ending in /i/c/i/, which is for the icon set with a transparent background. However, when it shows on my webpage the image's edges are poorly outlined, which is why I assume there is the white edging
 

Is there anyway to fix this? Also, if I try resizing the image to anything over it's original 50px by 50px dimensions it becomes noticeably distorted. I figured using the .gif file would allow for a smoother resize, but it doesn't seem to be the case. Does anyone have a solution for if I'd like to enlarge the weather condition images?
Photo of Michael Hill

Michael Hill

  • 3 Posts
  • 1 Reply Like
  • perplexed

Posted 2 years ago

  • 1
Photo of UnitRadius

UnitRadius

  • 11 Posts
  • 0 Reply Likes
I experienced the same issue, weather undeground needs to fix the icons by removing the white pixels. Or maybe the API could gives us data needed for us to supply our own icons. For example icon_description: rain_night.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
It does, there's a field "icon" that can be used with any image set of the same named icons.   Icon names are at the bottom https://www.wunderground.com/weather/api/d/docs?d=resources/phrase-glossary
Photo of UnitRadius

UnitRadius

  • 11 Posts
  • 0 Reply Likes
awesome!  thanks