private static void AddFrames(string filename, Bitmap bitmap) { //var mutexLock = new Mutex(false, bitmap.GetHashCode().ToString()); //mutexLock.WaitOne(); bitmap.Save(filename); bitmap.Dispose(); //GC.Collect(1); //mutexLock.ReleaseMutex(); }