private void InitializeBuffer() { if (_buffer == null) { FLBuffer i = Loader(Root); _buffer = i.Buffer; Width = i.Width; Height = i.Height; } }
public LazyFromFileFLBuffer(string file) : base(null) { File = file; Loader = root => { if (File == "INPUT") { return(root.Input); } Bitmap bmp = new Bitmap(Image.FromStream(IOManager.GetStream(File)), root.Dimensions.x, root.Dimensions.y); FLBuffer buf = new FLBuffer(root.Instance, bmp, DefinedBufferName + ":" + File); bmp.Dispose(); return(buf); }; }