I am having a company transfer a photo to a 17" x 24" poster board. They said I don't have enough resolution to upsize that much without losing clarity. So when I take a picture how do I dictate how many megapixels I am getting?
The only thing in the world that dictates how many pixels are you getting while taking a picture with a digital camera is... The camera.
1) First of all: read the specifications on your camera. If it is a simple camera, or a photo taken with a smart phone, the measure is for example 5 Megapixels, 10 Megapixels or something like that.
I'm going to use a round number: 6 Megapixels.
This is a round number because normally the photos have a ratio 3:2, in short, if you have 3,000 pixels on one side you have 2,000 on the other side. 3,000 x 2,000 = 6,000,000. 6 Mega Pixels.
2) How many pixels do i need for a print 17x24?
It depends. It depends on the quality you need.
A good portrait that you are hanging on the wall, about a family member, you can use 200 ppi.
200 of this 3,000 pixels on each inch your print has, so 3,000 / 200 = 15 inches... Ouch It is smaller than expected.
But in a general use, for a poster promoting an event, printed on a plotter you can use just 100ppi so you can print that same file to 30 inches.
In this example you can print 24 inches tall with a 6 Mpx photo with medium results.
For great results you need a 16 Mpx camera for a print that size with the 200ppi I mentioned earlier.
3) If it is the only photo you have... a unique moment in the history of mankind... it doesn't matter. It is the photo you have, and the size you want, and there is no other photo on the planet. So there is nothing you can do, but to enjoy your print.
4) I posted an explanation of the relationship between image size and print size here
5) If you have multiple options on your camera, regarding different file sizes on your photos, just use the higher ones.
Short answer: Use a camera with higher resolution.
At the standard 300 ppi needed to produce high quality prints you need a camera with 5100 x 7200 pixels to produce a 17" x 24" print. Since most higher resolution digital cameras use a 3:2 aspect ratio, you really need 5100 X 7650 pixels. That comes to about 39 Megapixels.
If you don't want to buy an expensive camera with high resolution, you could stitch a set of images into one large image.
Depending on what type of image you want to print this is a reasonable way of making large pictures. If you want to print landscapes or other types of photography that isn't nearby, you could get fairly good results. For close-up shots it is less easy because of the different geometry/distortion when moving the camera slightly.
Also short answer: there are some tools that will "up-res" an image, effectively creating pixels where none exist to give it a higher resolution than it was shot at. For some uses, this can be effective. For other uses, you'll look at the result and it'll be acceptable, and sometimes, even great.
But often, you'll try it and the result will make you think "I should have used a higher resolution camera", as @michael Clark noted.
There's no magic here, pixels are defined by the camera's sensor, and the number of pixels a camera captures is usually tied to how much it costs...But this is why specialty images like billboards are still shot with medium format cameras that cost $20K.