Controllers/AbstractExportController.cs
/// <summary>
/// Export a TIM file to a common image format.
/// </summary>
/// <param name="tim">The TIM file.</param>
/// <param name="clutIndex">The index of the CLUT to export with.</param>
/// <param name="filePath">The file path to export to.</param>
/// <param name="format">The image format to export to.</param>
Export a TIM file to a common image format.
Export a TIM file to a common image format .
public void ExportImage(TIM tim, int clutIndex, string filePath, ImageFormat format)
        {
            Log.Information($"Exporting image ({format}) to: {filePath}");
            var image = LibLSDUtil.GetImageDataFromTIM(tim, clutIndex, flip: false);
            Bitmap bmp = ImageUtil.ImageDataToBitmap(image.data, image.width, image.height);
            bmp.Save(filePath, format);
        }
public void ExportImage ( TIM tim , int clutIndex , string filePath , ImageFormat format ) { Log . Information ( $" Exporting image ( { format } ) to:  { filePath } " ) ; var image = LibLSDUtil . GetImageDataFromTIM ( tim , clutIndex , flip : false ) ; Bitmap bmp = ImageUtil . ImageDataToBitmap ( image . data , image . width , image . height ) ; bmp . Save ( filePath , format ) ; }
Export a TIM file to a common image format.
Export a TIM file to a common image format .
tim
TIM
The TIM file.
The TIM file .
clutIndex
int
The index of the CLUT to export with.
The index of the CLUT to export with .
filePath
string
The file path to export to.
The file path to export to .
format
ImageFormat
The image format to export to.
The image format to export to .