I'm using the following in my portfolio:
<?php
function getItemPreview()
{
global $wpdb, $post;
$img_cat = $wpdb->get_row('SELECT * FROM '.$wpdb->nggallery.' WHERE gid = '. get_post_meta($post->ID, 'pf_nextgen_gallery', true) .' ORDER by gid DESC limit 0,1');
$first_image = $wpdb->get_row('SELECT * FROM '. $wpdb->nggpictures .' WHERE exclude != 1 AND galleryid = '. get_post_meta($post->ID, 'pf_nextgen_gallery', true) .' ORDER by pid DESC limit 0,1');
$albumPreview = $wpdb->get_results('SELECT pid, filename FROM '.$wpdb->nggpictures.' WHERE pid = '.$img_cat->previewpic.'', OBJECT_K);
$toppreview = get_option ('siteurl') . '/' . $img_cat->path . '/' . $first_image->filename;
if ( $previewimg = $albumPreview[$img_cat->previewpic]->filename )
{
$toppreview = get_option ('siteurl').'/' . $img_cat->path . '/' . $previewimg;
echo '<style type="text/css">#image { background-image:url('.$toppreview.')!important; }</style>';
}
else
{
echo '<style type="text/css">#image { background-image:url('.$toppreview.')!important; }</style>';
}
}
?>
As you can see I add a custom field pf_nextgen_gallery that stores the ID of the gallery I want the preview of on that page/post. Ofcourse the output can be changed according to your wishes :)