internal override KalikoImage DrawResizedImage(KalikoImage sourceImage, Size calculatedSize, Size originalSize) { var resizedImage = new KalikoImage(calculatedSize); KalikoImage.DrawScaledImage(resizedImage, sourceImage, 0, 0, calculatedSize.Width, calculatedSize.Height); return(resizedImage); }
internal override KalikoImage DrawResizedImage(KalikoImage sourceImage, Size calculatedSize, Size originalSize) { var resizedImage = new KalikoImage(_targetSize, sourceImage.BackgroundColor); KalikoImage.DrawScaledImage(resizedImage, sourceImage, (_targetSize.Width - calculatedSize.Width) / 2, (_targetSize.Height - calculatedSize.Height) / 2, calculatedSize.Width, calculatedSize.Height); return(resizedImage); }