private IEnumerable<YCC> GetYCC(GFL_COLORMAP map) { for (int i = 0; i < map.Blue.Length; i++) { yield return new YCC((int)map.Red[i], (int)map.Green[i], (int)map.Blue[i]); } }
private void RefreshStruct() { m_gfl_bitmap_struct = (GFL_BITMAP)Marshal.PtrToStructure(m_gfl_bitmap, typeof(GFL_BITMAP)); if (m_gfl_bitmap_struct.ColorMap != IntPtr.Zero) m_colorMap = (GFL_COLORMAP)Marshal.PtrToStructure(m_gfl_bitmap_struct.ColorMap, typeof(GFL_COLORMAP)); }
private IEnumerable<Color> GetColors(GFL_COLORMAP map) { for (int i = 0; i < map.Blue.Length; i++) { yield return Color.FromArgb((int)map.Red[i],(int) map.Green[i], (int)map.Blue[i]); } }