public final function contract( int $percent, bool $internal = true )
      : IImage
   {

      if ( $percent < 1 || $percent >= 100 )
      {
         throw new ArgumentError(
            'percent',
            $percent,
            'Drawing.Image',
            'Image dimension contraction must produce a smaller, non zero sized image!'
         );
      }

      $newWidth  = \intval( \floor( $this->getWidth()  * $percent / 100 ) );
      $newHeight = \intval( \floor( $this->getHeight() * $percent / 100 ) );

      if ( $this->isTrueColor() )
      {
         $dst = \imagecreatetruecolor( $newWidth, $newHeight );
      }
      else
      {
         $dst = \imagecreate( $newWidth, $newHeight );
      }

      if ( $this->canUseTransparency() )
      {
         \imagealphablending( $dst, false );
         \imagesavealpha( $dst, true );
      }

      \imagecopyresized( $dst, $this->r, 0, 0, 0, 0, $newWidth, $newHeight, $this->getWidth(), $this->getHeight() );

      if ( $internal )
      {
         if ( ! \is_null( $this->r ) )
         {
            \imagedestroy( $this->r );
            $this->r = null;
         }
         $this->r = $dst;
         $this->size->setWidth( $newWidth );
         $this->size->setHeight( $newHeight );
         return $this;
      }

      return new GdImage(
         $dst,
         new Size( $newWidth, $newHeight ),
         $this->mimeType,
         $this->_file
      );

   }