Skip to main content

ImageExtensions

Assembly: ServiceStack.dll
View Source
Declaration
public static class ImageExtensions

Methods

ResizeToPng(Image, Int32, Int32)

View Source
Declaration
public static MemoryStream ResizeToPng(this Image img, int newWidth, int newHeight)
Returns

System.IO.MemoryStream

Parameters
TypeName
System.Drawing.Imageimg
System.Int32newWidth
System.Int32newHeight

CropToPng(Image, Int32, Int32, Int32, Int32)

View Source
Declaration
public static MemoryStream CropToPng(this Image img, int newWidth, int newHeight, int startX = 0, int startY = 0)
Returns

System.IO.MemoryStream

Parameters
TypeName
System.Drawing.Imageimg
System.Int32newWidth
System.Int32newHeight
System.Int32startX
System.Int32startY