public function writeXMLAttributes( \XMLWriter $w )
   {

      switch ( $this->data[ 'type' ] )
      {

         case ImageSizeReducerType::CROP:
            $w->writeAttribute( 'type',   'crop' );
            $w->writeAttribute( 'width',  $this->data[ 'width' ] );
            $w->writeAttribute( 'height', $this->data[ 'height' ] );
            break;

         case ImageSizeReducerType::RESIZE:
            $w->writeAttribute( 'type',   'resize' );
            $w->writeAttribute( 'width',  $this->data[ 'width' ] );
            $w->writeAttribute( 'height', $this->data[ 'height' ] );
            break;

         case ImageSizeReducerType::LONG_SIDE:
            $w->writeAttribute( 'type',      'long' );
            $w->writeAttribute( 'landscape', $this->data[ 'landscape' ] );
            $w->writeAttribute( 'portrait',  $this->data[ 'portrait' ] );
            break;

         case ImageSizeReducerType::SHORT_SIDE:
            $w->writeAttribute( 'type',      'short' );
            $w->writeAttribute( 'landscape', $this->data[ 'landscape' ] );
            $w->writeAttribute( 'portrait',  $this->data[ 'portrait' ] );
            break;

         default: break;

      }

   }