public static (float[] data, int width, int height) GetImageDataFromTIM(TIM tim, bool flip = true) { IColor[,] imageColors = tim.GetImage(); int width = imageColors.GetLength(1); int height = imageColors.GetLength(0); float[] imageData = ImageColorsToData(imageColors, width, height, flip); return(imageData, width, height); }
/// <summary> /// Get the pixels and width/height from a loaded TIM. /// </summary> /// <param name="tim">The loaded TIM.</param> /// <returns>TimData containing the TIM data.</returns> public static TimData GetImageDataFromTIM(TIM tim) { TimData data; data.Colors = tim.GetImage(); data.Width = data.Colors.GetLength(1); data.Height = data.Colors.GetLength(0); return(data); }