How can I convert an image's pixels to actual LEGO colors?
You can use GIMP for this.
First you need to scale the image to the size you want. (If you want to stack bricks on top of each other instead of a baseplate, use a different y-scaling to correspond the bricks height.)

Now create a palette by going to the Palette tab and click the "New palette" icon.


In this add the bricks colors you want. You can find the colors RGB values to a brick color here: http://www.peeron.com/cgi-bin/invcgis/colorguide.cgi

Now convert into these colors by going to "Image->Mode->Indexed...". (If indexed is already selected, select RGB first and then click Indexed.) A "Convert Image to Indexed Colors" dialog box should appear.


Select "Use custom palette" and select the palette you just created.

Click "Convert" to get your result. If you are not quite satisfied, click undo and try to change/add some colors in your custom palette and convert again.