Q:

How can I check if a product photo is "excluded"?

My product page template seems to be showing all photos linked to a product, even if they have the "Exclude" option set. How can I check if an image has the "exclude" option set? I want to add a simple "if not" statement to my template that says "if it is not excluded, display it."
UPDATE:
I tried the following code and it still showed all images
<?php $ac=0; foreach ($_product->getMediaGalleryImages() as $image): ?>
                <?php if( $image->getExclude()==0 ): ?>
                <li id="navi1" onClick="changeClass1()" >
        <a href="javascript:void(0)" id="nav-image" name="prdImage">
        <img class="<?php echo Mage::helper('catalog/image') ->init($_product, 'image', $image->getFile())->resize();?>" src="<?php echo Mage::helper('catalog/image') ->init($_product, 'thumbnail', $image->getFile())->resize(66,66);?>"  alt="<?php echo Mage::helper('catalog/image') ->init($_product, 'image', $image->getFile())->resize(1200);?>">
                </a>
               </li>
            <?php $ac++;
            endif;
              endforeach; ?>

A:

magento media attribute  a have field  name disabled or exclude which tell which image are in excluded list 
check:
    Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages() as $_image):
/* product image in exclude in list */
    if( $_image->getExclude()==1){
    $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(301);
    }
    endforeach; 

For getting non exclude try getDisabled()==0 because it save it on database as 0
Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages() as $_image):

        if( $_image->getDisabled()==0){
        $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(301);
        }
        endforeach; 

