before
In these a one pixel border is added to the two larger images, and the smallest image is created by allowing the browser to resize the image.
after
Here all three images are created by GD, but the second and third are bicubicly resized from the first after the border is added, rather than from the original image. This double resize adds a generational quality loss but it also allows a sub-pixel border: 0.35 pixels for the middle one and 0.16 for the smallest. I think I prefer it but it's obviously an aesthetic call. (I might experiment by doubling the width of the border on the original before it is resized to give 0.75 and 0.32 pixel borders.) Does anyone else think this is an improvement?