Beispiel #1
0
        protected virtual void WriteBytes()
        {
            if (colors.Length == width * height)
            {
                var stream = new MemoryStream();

                imageExporter.Write(width, height, stream, colors);

                bytes = stream.ToArray();
            }

            currentStep++;
        }
Beispiel #2
0
        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++;
        }