Resize a given bitmap array. - CSharp System.Drawing

CSharp examples for System.Drawing:Image Size

Description

Resize a given bitmap array.

Demo Code


using System;/*  ww  w . j av a2  s.c o  m*/

public class Main{
    /// <summary>
    /// Resize a given bitmap array.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="array"></param>
    public static void ResizeArray<T>(ref T[] array)
    {
      var resizeArray = new T[array.Length * 2];
      Array.Copy(array, resizeArray, array.Length);
      array = resizeArray;
    }
}

Related Tutorials