Try this
global $nggdb;
foreach($ids as $id) {
$gallery = $nggdb->get_gallery($id, 'sortorder', 'ASC', true, 0, 0);
foreach($gallery as $image) {
echo $image->imageURL;
echo $image->alttext;
echo $image->description;
}
}