int imagesetpixel
ImageSetPixelは画像im上にcol色で、座標x, y(左上が0, 0)に点を 描画します。
imagecreate()および imagecolorallocate()も参考にしてください。