Creates a formatted image from the passed image (Resizes the original image and converts it to a specified image type).

Namespace: MonoSoftware.Core.Drawing
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static byte[] FormatImage(
	bool useSuppliedSize,
	bool maintainAspectRatio,
	byte[] rawImage,
	int width,
	int height,
	ImageFormat imgFormat
)
Visual Basic
Public Shared Function FormatImage ( 
	useSuppliedSize As Boolean,
	maintainAspectRatio As Boolean,
	rawImage As Byte(),
	width As Integer,
	height As Integer,
	imgFormat As ImageFormat
) As Byte()
Visual C++
public:
static array<unsigned char>^ FormatImage(
	bool useSuppliedSize, 
	bool maintainAspectRatio, 
	array<unsigned char>^ rawImage, 
	int width, 
	int height, 
	ImageFormat^ imgFormat
)
F#
static member FormatImage : 
        useSuppliedSize : bool * 
        maintainAspectRatio : bool * 
        rawImage : byte[] * 
        width : int * 
        height : int * 
        imgFormat : ImageFormat -> byte[] 

Parameters

useSuppliedSize
Type: System..::..Boolean
Use supplied size. False: Image W/H is used; True: Supplied W/H is used
maintainAspectRatio
Type: System..::..Boolean
Maintain aspect ratio
rawImage
Type: array<System..::..Byte>[]()[][]
Raw image
width
Type: System..::..Int32
Width
height
Type: System..::..Int32
Height
imgFormat
Type: System.Drawing.Imaging..::..ImageFormat
Image format

Return Value

Type: array<Byte>[]()[][]
Formatted Image

See Also