The DPI is just a number stored in the file, it doesn't actually change the image.
You could even make a suitable image with Paint. If, for example, the image should be 10"x10", you make the image file 30 000 pixels by 30 000 pixels
code:
real length in inches * DPI = length in pixels
10 * 300 = 30 000 pixels