protected virtual void WriteBytes() { if (colors.Length == width * height) { var stream = new MemoryStream(); imageExporter.Write(width, height, stream, colors); bytes = stream.ToArray(); } currentStep++; }
protected virtual void WriteBytes() { if (colors.Length != width * height) { // TODO should we throw an error? The color data doesn't match the size return; } var stream = new MemoryStream(); imageExporter.Write(width, height, stream, colors); bytes = stream.ToArray(); currentStep++; }