public function setIfd(PelIfd $ifd)
    {
        if ($ifd->getType() != PelIfd::IFD0) {
            throw new PelInvalidDataException('Invalid type of IFD: %d, expected %d.', $ifd->getType(), PelIfd::IFD0);
        }
        $this->ifd = $ifd;
    }