protected function buildImageSubdef(SimpleXMLElement $sd)
    {
        $image = new Image($this->translator);
        if ($sd->icodec) {
            $image->setOptionValue(Image::OPTION_ICODEC, (string) $sd->icodec);
        }
        if ($sd->size) {
            $image->setOptionValue(Image::OPTION_SIZE, (int) $sd->size);
        }
        if ($sd->quality) {
            $image->setOptionValue(Image::OPTION_QUALITY, (int) $sd->quality);
        }
        if ($sd->strip) {
            $image->setOptionValue(Image::OPTION_STRIP, p4field::isyes($sd->strip));
        }
        if ($sd->dpi) {
            $image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi);
        }
        if ($sd->flatten) {
            $image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten));
        }
        return $image;
    }
protected function buildImageSubdef(SimpleXMLElement $sd)
    {
        $image = new Image($this->translator);
        if ($sd->icodec) {
            $image->setOptionValue(Image::OPTION_ICODEC, (string) $sd->icodec);
        }
        if ($sd->size) {
            $image->setOptionValue(Image::OPTION_SIZE, (int) $sd->size);
        }
        if ($sd->quality) {
            $image->setOptionValue(Image::OPTION_QUALITY, (int) $sd->quality);
        }
        if ($sd->strip) {
            $image->setOptionValue(Image::OPTION_STRIP, p4field::isyes($sd->strip));
        }
        if ($sd->dpi) {
            $image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi);
        }
        if ($sd->flatten) {
            $image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten));
        }
        return $image;
    }
protected function buildImageSubdef ( SimpleXMLElement $ sd ) { $ image = new Image ( $ this -> translator ) ; if ( $ sd -> icodec ) { $ image -> setOptionValue ( Image :: OPTION_ICODEC , ( string ) $ sd -> icodec ) ; } if ( $ sd -> size ) { $ image -> setOptionValue ( Image :: OPTION_SIZE , ( int ) $ sd -> size ) ; } if ( $ sd -> quality ) { $ image -> setOptionValue ( Image :: OPTION_QUALITY , ( int ) $ sd -> quality ) ; } if ( $ sd -> strip ) { $ image -> setOptionValue ( Image :: OPTION_STRIP , p4field :: isyes ( $ sd -> strip ) ) ; } if ( $ sd -> dpi ) { $ image -> setOptionValue ( Image :: OPTION_RESOLUTION , ( int ) $ sd -> dpi ) ; } if ( $ sd -> flatten ) { $ image -> setOptionValue ( Image :: OPTION_FLATTEN , p4field :: isyes ( $ sd -> flatten ) ) ; } return $ image ; }
Build Image Subdef object depending the SimpleXMLElement

@param  SimpleXMLElement $sd
@return Image
Build Image Subdef object depending the SimpleXMLElement