Conversion Size of JPG to the Plane

Anyone know how an image is resized as it enters the building plane? Wondering if I create my own images how big they need to be to avoid become grainy as I resize them?