JHCuttingImage.Generate Method (Image, Int32, Int32, Int32, Int32, ImageFormat)

DCSoft.DBUtilityGeneric

JHCuttingImageGenerate Method (Image, Int32, Int32, Int32, Int32, ImageFormat)
从源图像指定位置并且按照指定区域切割图像

Namespace: DCSoft.Utility.Drawing
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static Stream Generate(
	Image image,
	int srcX,
	int srcY,
	int srcWidth,
	int srcHeight,
	ImageFormat imageFormat
)

Parameters

image
Type: System.DrawingImage
源图像
srcX
Type: SystemInt32
要切割的源图像部分的左上角的 x 坐标
srcY
Type: SystemInt32
要切割的源图像部分的左上角的 y 坐标
srcWidth
Type: SystemInt32
切割区域宽度(以像素为单位)
srcHeight
Type: SystemInt32
切割区域高度(以像素为单位)
imageFormat
Type: System.Drawing.ImagingImageFormat
要生成的图像类型

Return Value

Type: Stream
返回切割区域图像的内存流
See Also