C# Class AcTools.Utils.ImageUtils

Mostra file Open project: gro-ove/actools

Public Methods

Method Description
ApplyPreview ( string source, string destination, bool resize ) : void
ApplyPreview ( string source, string destination, double maxWidth = 0d, double maxHeight = 0d ) : void
ApplyPreviewImageMagick ( string source, string destination, double maxWidth = 0d, double maxHeight = 0d ) : void
ApplyPreviews ( string acRoot, string carName, string source, bool resize ) : void
ApplyPreviewsAsync ( string acRoot, string carName, string source, bool resize, double?>.IProgress progress = null, CancellationToken cancellation = default(CancellationToken) ) : Task
Convert ( string source, string destination, int quality = 95 ) : void
ConvertImageMagick ( string source, string destination, int quality ) : void
GetBaseColors ( Bitmap bitmap ) : Color[]
GetBaseColors48 ( Bitmap bitmap ) : Color[]
LoadImageMagickAssembly ( string dllFilename ) : void
ResizeFile ( string source, string destination, int width, int height ) : void
UnloadImageMagickAssembly ( ) : void

Private Methods

Method Description
CheckIfMagickSupported ( ) : bool
CreateLivery ( string outputFile ) : void
CurrentDomain_AssemblyResolve ( object sender, ResolveEventArgs args ) : Assembly
GenerateLivery ( string inputFile, string outputFile ) : void
LoadAsConventionalBuffer ( byte data, bool wrapping = true ) : byte[]
LoadAsConventionalBuffer ( byte data, bool noAlpha, string &formatDescription, bool wrapping = true ) : byte[]
LoadFromFileAsConventionalBuffer ( string filename, bool wrapping = true ) : byte[]
LoadFromFileAsImage ( string filename, bool wrapping = true ) : Image
TestImageMagick ( ) : string

Method Details

ApplyPreview() public static method

public static ApplyPreview ( string source, string destination, bool resize ) : void
source string
destination string
resize bool
return void

ApplyPreview() public static method

public static ApplyPreview ( string source, string destination, double maxWidth = 0d, double maxHeight = 0d ) : void
source string
destination string
maxWidth double
maxHeight double
return void

ApplyPreviewImageMagick() public static method

public static ApplyPreviewImageMagick ( string source, string destination, double maxWidth = 0d, double maxHeight = 0d ) : void
source string
destination string
maxWidth double
maxHeight double
return void

ApplyPreviews() public static method

public static ApplyPreviews ( string acRoot, string carName, string source, bool resize ) : void
acRoot string
carName string
source string
resize bool
return void

ApplyPreviewsAsync() public static method

public static ApplyPreviewsAsync ( string acRoot, string carName, string source, bool resize, double?>.IProgress progress = null, CancellationToken cancellation = default(CancellationToken) ) : Task
acRoot string
carName string
source string
resize bool
progress double?>.IProgress
cancellation CancellationToken
return Task

Convert() public static method

public static Convert ( string source, string destination, int quality = 95 ) : void
source string
destination string
quality int
return void

ConvertImageMagick() public static method

public static ConvertImageMagick ( string source, string destination, int quality ) : void
source string
destination string
quality int
return void

GetBaseColors() public static method

public static GetBaseColors ( Bitmap bitmap ) : Color[]
bitmap Bitmap
return Color[]

GetBaseColors48() public static method

public static GetBaseColors48 ( Bitmap bitmap ) : Color[]
bitmap Bitmap
return Color[]

LoadImageMagickAssembly() public static method

public static LoadImageMagickAssembly ( string dllFilename ) : void
dllFilename string
return void

ResizeFile() public static method

public static ResizeFile ( string source, string destination, int width, int height ) : void
source string
destination string
width int
height int
return void

UnloadImageMagickAssembly() public static method

public static UnloadImageMagickAssembly ( ) : void
return void