C# 클래스 TileIconifier.Core.Utilities.ImageUtils

파일 보기 프로젝트 열기: Jonno12345/TileIconifier

공개 메소드들

메소드 설명
BitmapsAreEqual ( Bitmap image1, Bitmap image2 ) : bool
ByteArrayToImage ( byte bytesIn ) : Image
ConvertToIcon ( Image input, Stream output, int size = 16, bool preserveAspectRatio = true ) : void

Converts a PNG image to a icon (ico)

GetScaledWidthAndHeight ( int curWidth, int curHeight, int maxWidth, int maxHeight ) : Size
ImageToByteArray ( Image imageIn ) : byte[]
LoadFileToBitmap ( string path ) : Bitmap
LoadFileToByteArray ( string path ) : byte[]
ResizeImage ( Image image, int width, int height ) : Bitmap
ScaleImage ( Image image, int maxWidth, int maxHeight ) : Image

메소드 상세

BitmapsAreEqual() 공개 정적인 메소드

public static BitmapsAreEqual ( Bitmap image1, Bitmap image2 ) : bool
image1 System.Drawing.Bitmap
image2 System.Drawing.Bitmap
리턴 bool

ByteArrayToImage() 공개 정적인 메소드

public static ByteArrayToImage ( byte bytesIn ) : Image
bytesIn byte
리턴 Image

ConvertToIcon() 공개 정적인 메소드

Converts a PNG image to a icon (ico)
public static ConvertToIcon ( Image input, Stream output, int size = 16, bool preserveAspectRatio = true ) : void
input Image The input stream
output Stream The output stream
size int The size (16x16 px by default)
preserveAspectRatio bool Preserve the aspect ratio
리턴 void

GetScaledWidthAndHeight() 공개 정적인 메소드

public static GetScaledWidthAndHeight ( int curWidth, int curHeight, int maxWidth, int maxHeight ) : Size
curWidth int
curHeight int
maxWidth int
maxHeight int
리턴 System.Drawing.Size

ImageToByteArray() 공개 정적인 메소드

public static ImageToByteArray ( Image imageIn ) : byte[]
imageIn Image
리턴 byte[]

LoadFileToBitmap() 공개 정적인 메소드

public static LoadFileToBitmap ( string path ) : Bitmap
path string
리턴 System.Drawing.Bitmap

LoadFileToByteArray() 공개 정적인 메소드

public static LoadFileToByteArray ( string path ) : byte[]
path string
리턴 byte[]

ResizeImage() 공개 정적인 메소드

public static ResizeImage ( Image image, int width, int height ) : Bitmap
image Image
width int
height int
리턴 System.Drawing.Bitmap

ScaleImage() 공개 정적인 메소드

public static ScaleImage ( Image image, int maxWidth, int maxHeight ) : Image
image Image
maxWidth int
maxHeight int
리턴 Image