If it's 512x512 and you upload the image on "512 head texture" item then it will work exactly the way it looks and yes it will be 512 quality texture.
Tho if you have 512 image and upload it on "Head texture" (so 128 tex), it will resize and scale itself down, resulting in noticeable quality loss (it becomes blurry). If you have 128 image and upload it on 512 it will look just like 128.
Tl;dr if you make 512x512px image in gimp, it will work as 512 texture.