Following snippet used to add image to magento image gallery via script
First you need to create the product object via the product model as follows
$product = Mage::getModel('catalog/product');
Now once the object in place then you can add the image as product attribute
$product->addImageToMediaGallery('full/path/to/image', array('small_image','thumbnail','image'), false, false);
Note the second parameter that specifies the where to add the image, currently all three given ie small image thumbnail and large image.
Depending on the image name various images can be added setting individual images.
If you need any kind of help you can contact us as we are one of best Magento extensions developer.
Get 25% discount all our Magento Extensions.