Its a problem with your texture file not with your code. The gui textures have to be 256 by 256 even if you don't use all of the space. I actually had the same problem as you and that was how I solved it. When the texture file isn't the right size I believe Minecraft will try to scale it up to the right resolution hence the scaling. Hope this helped!