private bool UpdateCurrent(long timestamp) { if (generator == null || !workingZone.Contains(timestamp)) { return(false); } if (current != null && current.Image != null) { generator.DisposePrevious(current.Image); } Bitmap bmp = generator.Generate(timestamp); current.Image = bmp; current.Timestamp = timestamp; return(true); }
private bool UpdateCurrent(long timestamp) { // We can generate at any timestamp, but we still need to report when the // end of the working zone is reached. Otherwise frame enumerators like // in video save would just go on for ever. if (generator == null || !workingZone.Contains(timestamp)) { return(false); } if (current != null && current.Image != null) { generator.DisposePrevious(current.Image); } SystemBitmap bmp = generator.Generate(timestamp); current.Image = bmp; current.Timestamp = timestamp; return(true); }