protected override System.Drawing.Size CalculateNewImageSize( UnmanagedImage sourceData )
{
// perform checking of source corners - they must feet into the image
foreach ( IntPoint point in baseFilter.SourceQuadrilateral )
{
if ( ( point.X < 0 ) ||
( point.Y < 0 ) ||
( point.X >= sourceData.Width ) ||
( point.Y >= sourceData.Height ) )
{
throw new ArgumentException( "The specified quadrilateral's corners are outside of the given image." );
}
}
return new Size( baseFilter.NewWidth, baseFilter.NewHeight );
}
}